using LCU.API.Internal.MemberPreferencesApiLib.Persistence; using LCU.Library.Internal.MemberPreferencesApiModels.Entities; using LCU.Library.Internal.MemberPreferencesApiModels.Enums; using Microsoft.EntityFrameworkCore; namespace LCU.API.Internal.MemberPreferencesApiLib.Repositories; public class DnaAuditProcessRepository : BaseRepository, IDnaAuditProcessRepository { public DnaAuditProcessRepository(IApplicationDbContext context) : base(context) { } public async Task> GetAllDnaAuditProcesses() { return await _context.DnaAuditProcesses.ToListAsync(); } public async Task GetDnaAuditProcessByDnaProcessType(DnaAuditProcessType type) { return await _context.DnaAuditProcesses.Where(d => d.DnaProcessType == type).FirstOrDefaultAsync(); } public async Task Update(DnaAuditProcess existing) { _context.DnaAuditProcesses.Update(existing); await _context.SaveChangesAsync(); } }