improvements, fixes

This commit is contained in:
Loretta 2025-09-14 07:57:45 +02:00
parent efe66eaa88
commit 15ac7a0771
2 changed files with 4 additions and 4 deletions

View File

@ -171,7 +171,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Controllers
{
_logger.Detail($"GetMeasuringUsers invoked");
var customers = await ctx.GetCustormersBySystemRoleName(FruitBankConst.MeasuringRoleSystemName).OrderBy(o => o.Username).Select(c => new CustomerDto(c)).ToListAsync();
var customers = await ctx.GetCustormersBySystemRoleName(FruitBankConst.MeasuringRoleSystemName).Select(c => new CustomerDto(c)).ToListAsync();
return customers; //.ToModelDto<CustomerDto>();
}
@ -181,7 +181,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Controllers
{
_logger.Detail($"GetProductDtos invoked");
return await ctx.GetProducts().OrderBy(o => o.Name).Select(c => new ProductDto(c)).ToListAsync();
return await ctx.GetProducts().Select(c => new ProductDto(c)).ToListAsync();
}
[SignalR(SignalRTags.AuthenticateUser)]

View File

@ -71,9 +71,9 @@ public class FruitBankDbContext : MgDbContextBase, IPartnerDbSet<PartnerDbTable>
where c.Active && !c.Deleted && cr.SystemName == systemRoleName
select c;
return query.Distinct();
return query.Distinct().OrderBy(o => o.Username);
}
public IQueryable<Product> GetProducts()
=> Products.Table.Where(p => !p.Deleted);
=> Products.Table.Where(p => !p.Deleted).OrderBy(o => o.Name);
}