using Distribution.Data; using Microsoft.EntityFrameworkCore; namespace Distribution.Features.Supplier; public class SupplierRepository(AppDBContext context) : ISupplierRepository { public async Task GetByIdAsync(Guid id) => await context.Suppliers.FindAsync(id); public async Task> GetAllAsync() => await context.Suppliers.ToListAsync(); public async Task AddAsync(Models.Supplier entity) => await context.Suppliers.AddAsync(entity); public void Update(Models.Supplier entity) => context.Suppliers.Update(entity); public void Remove(Models.Supplier entity) { entity.IsActive = false; context.Suppliers.Update(entity); } }