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 CleaningLevelRepository : BaseRepository, ICleaningLevelRepository { public CleaningLevelRepository(AppDbContext context) : base(context) { } public async Task> ListAllAsync() { return await _context.CleaningLevelCodes.ToListAsync(); } public async Task AddAsync(CleaningLevel cleaningLevelCodes) { await _context.CleaningLevelCodes.AddAsync(cleaningLevelCodes); } public async Task FindByIdAsync(int id) { return await _context.CleaningLevelCodes.Where(c => c.Code == id).FirstOrDefaultAsync(); } public void Update(CleaningLevel category) { _context.CleaningLevelCodes.Update(category); } public void Remove(CleaningLevel category) { _context.CleaningLevelCodes.Remove(category); } } }