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