コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }