Changes in Views and mappings

This commit is contained in:
2025-01-24 21:30:58 +01:00
parent ed726eea09
commit a95eed2041
12 changed files with 138 additions and 40 deletions

View File

@@ -13,8 +13,7 @@ namespace SytelineSaAppEfDataModel.Services
{
public async Task<IEnumerable<CustomerOrderDto>> GetAll()
{
return await context.CustomerOrders.Select(x => mapper.Map<CustomerOrderDto>(x))
.OrderByDescending(x => x.CreateDate).ToListAsync();
return await context.CustomerOrders.Select(x => mapper.Map<CustomerOrderDto>(x)).ToListAsync();
}
public async Task<CustomerOrderDto?> GetByOrderNumber(string orderNumber)