Completo refactor using in classi Lux.Data

This commit is contained in:
Samuele Locatelli
2026-03-25 08:24:25 +01:00
parent 8530434732
commit ac397783be
108 changed files with 162 additions and 499 deletions
@@ -1,6 +1,4 @@
using EgwMultiEngineManager.Data;
namespace EgwCoreLib.Lux.Data.Repository.Items
namespace EgwCoreLib.Lux.Data.Repository.Items
{
public class SellingItemRepository : BaseRepository, ISellingItemRepository
{
@@ -28,7 +26,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Items
return await dbCtx.SaveChangesAsync() > 0;
}
public async Task<List<SellingItemModel>> GetByEnvirAsync(Constants.EXECENVIRONMENTS envir)
public async Task<List<SellingItemModel>> GetByEnvirAsync(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS envir)
{
await using var dbCtx = await CreateContextAsync();
return await dbCtx.DbSetSellItem
@@ -45,11 +43,11 @@ namespace EgwCoreLib.Lux.Data.Repository.Items
.FirstOrDefaultAsync();
}
public async Task<List<SellingItemModel>> GetFiltAsync(Constants.EXECENVIRONMENTS envir, ItemSourceType sourceType)
public async Task<List<SellingItemModel>> GetFiltAsync(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS envir, ItemSourceType sourceType)
{
await using var dbCtx = await CreateContextAsync();
return await dbCtx.DbSetSellItem
.Where(x => (x.Envir == envir || envir == Constants.EXECENVIRONMENTS.NULL) && (sourceType == ItemSourceType.ND || x.SourceType == sourceType))
.Where(x => (x.Envir == envir || envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.NULL) && (sourceType == ItemSourceType.ND || x.SourceType == sourceType))
.AsNoTracking()
.ToListAsync();
}