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 BodyStyleRepository : BaseRepository, IBodyStyleRepository { public BodyStyleRepository(AppDbContext context) : base(context) { } public async Task> ListAllAsync() { return await _context.BodyStyleCodes.ToListAsync(); } public async Task AddAsync(BodyStyle bodyStyleCodes) { await _context.BodyStyleCodes.AddAsync(bodyStyleCodes); } public async Task FindByIdAsync(string id) { return await _context.BodyStyleCodes.Where(c => c.Code.Equals(id)).FirstOrDefaultAsync(); } public void Update(BodyStyle category) { _context.BodyStyleCodes.Update(category); } public void Remove(BodyStyle category) { _context.BodyStyleCodes.Remove(category); } } }