order software by name alphabetically

This commit is contained in:
Collin Barrett 2018-09-03 17:49:14 -05:00
parent d594bf352b
commit fc562a0531

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using AutoMapper.QueryableExtensions;
@ -18,6 +19,6 @@ public SoftwareService(FilterListsDbContext dbContext, IConfigurationProvider ma
}
public async Task<IEnumerable<SoftwareDto>> GetAll() =>
await DbContext.Software.ProjectTo<SoftwareDto>(MapConfig).ToListAsync();
await DbContext.Software.OrderBy(s => s.Name).ProjectTo<SoftwareDto>(MapConfig).ToListAsync();
}
}