#3916 mapping to a IEnumerable resulted in all items in the result list being the same. Now map items indiviually. Could be caused by this : https://stackoverflow.com/questions/17268362/automapper-for-a-list-scenario-only-seems-to-repeat-mapping-the-first-object-in
This commit is contained in:
committed by
Sebastiaan Janssen
parent
b852c78861
commit
0ce54847b0
@@ -27,7 +27,7 @@ namespace Umbraco.Web.Editors
|
||||
long totalRecords;
|
||||
var dateQuery = sinceDate.HasValue ? Query<IAuditItem>.Builder.Where(x => x.CreateDate >= sinceDate) : null;
|
||||
var result = Services.AuditService.GetPagedItemsByEntity(id, pageNumber - 1, pageSize, out totalRecords, orderDirection, customFilter: dateQuery);
|
||||
var mapped = Mapper.Map<IEnumerable<AuditLog>>(result);
|
||||
var mapped = result.Select(item => Mapper.Map<AuditLog>(item)); // Mapper.Map<IEnumerable<AuditLog>>(result);
|
||||
|
||||
var page = new PagedResult<AuditLog>(totalRecords, pageNumber, pageSize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user