using LCU.API.Internal.RepoApi.Repos.Models.Settings; using LCU.API.Internal.RepoApi.Repos.Persistence; using Microsoft.EntityFrameworkCore; namespace LCU.API.Internal.RepoApi.Repos.Repositories.Settings { public class AllowedStatusChangeRepository : BaseRepository, IAllowedStatusChangeRepository { public AllowedStatusChangeRepository(AppDbContext context) : base(context) { } public async Task> ListAllAsync() { return await _context.AllowedStatusChanges.ToListAsync(); } public async Task AddAsync(AllowedStatusChange allowedStatusChanges) { await _context.AllowedStatusChanges.AddAsync(allowedStatusChanges); } public async Task FindByIdAsync(int id) { return await _context.AllowedStatusChanges.Where(c => c.ID == id).FirstOrDefaultAsync(); } public void Update(AllowedStatusChange category) { _context.AllowedStatusChanges.Update(category); } public void Remove(AllowedStatusChange category) { _context.AllowedStatusChanges.Remove(category); } } }