private IResultList <IContentEntity> Sort(IResultList <IContentEntity> contents, IList <Guid> ids) { var sorted = ids.Select(id => contents.FirstOrDefault(x => x.Id == id)).Where(x => x != null); return(ResultList.Create(contents.Total, sorted)); }
private static IResultList <IAssetEntity> Sort(IResultList <IAssetEntity> assets, IReadOnlyList <Guid> ids) { var sorted = ids.Select(id => assets.FirstOrDefault(x => x.Id == id)).Where(x => x != null); return(ResultList.Create(assets.Total, sorted)); }