I would like to return a list of names that do not exist in report. However I am not sure how to loop properly through IEnumerable<string> names using a LINQ. Is there a way to loop through another array using LINQ ?
private class Report
{
public string UserName { get; set; }
public string city { get; set; }
public string image { get; set; }
}
List<Report>report = await _service(id).ConfigureAwait(false);
IEnumerable<string> names = await _names(id).ConfigureAwait(false);
// only want to get list of names that do not exist in report
var newList = reports.Where(x => x.UserName.Where(i => != names)); // doesn't work