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