Answer the question
In order to leave comments, you need to log in
How to return the correct result?
I return empty IEnumerable values every time:
private static IEnumerable<UserReportRow> CreateReportRows(UserReportItemDal[] source, IEnumerable<GetIdentityUserReportResponse> identityData)
{
var result = new List<UserReportRow>();
foreach (var item in source)
{
var identityItem = identityData.First(x => x.User == item.Id);
new UserReportRow()
{
Name = item.Name,
Surname = item.Surname,
City = item.City,
Nickname1 = identityItem.Nickname1,
Nickname2 = identityItem.Nickname2,
};
}
return result;
}
Answer the question
In order to leave comments, you need to log in
At the moment, the code from the question can be reduced to two lines:
private static IEnumerable<UserReportRow> CreateReportRows(UserReportItemDal[] source, IEnumerable<GetIdentityUserReportResponse> identityData)
{
var result = new List<UserReportRow>();
return result;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question