re-add orderby() to list summaries endpoint

still experiencing #244
This commit is contained in:
Collin M. Barrett 2018-08-13 12:06:43 -05:00
parent d39f249649
commit b3fd608c91

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using AutoMapper.QueryableExtensions;
@ -18,7 +19,9 @@ public FilterListService(FilterListsDbContext dbContext, IConfigurationProvider
}
public async Task<IEnumerable<ListSummaryDto>> GetAllSummariesAsync() =>
await DbContext.FilterLists.ProjectTo<ListSummaryDto>(ConfigurationProvider).ToListAsync();
await DbContext.FilterLists.OrderBy(l => l.Name)
.ProjectTo<ListSummaryDto>(ConfigurationProvider)
.ToListAsync();
public async Task<ListDetailsDto> GetDetailsAsync(uint id) =>
await DbContext.FilterLists.ProjectTo<ListDetailsDto>(ConfigurationProvider)