Add pricing and supplier master data

This commit is contained in:
2026-08-20 17:28:55 +05:30
parent 7a2494c156
commit 63bc6e9cd8
26 changed files with 6138 additions and 9 deletions
@@ -3,6 +3,7 @@ namespace Distribution.Features.Store;
public interface IStoreRepository
{
Task<Models.Store?> GetByIdAsync(Guid id);
Task<Models.Store?> GetByIdWithRegionAsync(Guid id);
Task<List<Models.Store>> GetAllAsync();
Task AddAsync(Models.Store entity);
void Update(Models.Store entity);
@@ -8,6 +8,11 @@ public class StoreRepository(AppDBContext context) : IStoreRepository
public async Task<Models.Store?> GetByIdAsync(Guid id) =>
await context.Stores.FindAsync(id);
public async Task<Models.Store?> GetByIdWithRegionAsync(Guid id) =>
await context.Stores
.Include(s => s.Route).ThenInclude(r => r.Region)
.FirstOrDefaultAsync(s => s.Id == id);
public async Task<List<Models.Store>> GetAllAsync() =>
await context.Stores.ToListAsync();