using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using LCU.API.Internal.RepoApi.Repos.Models; using LCU.API.Internal.RepoApi.Repos.Persistence; using Microsoft.EntityFrameworkCore; namespace LCU.API.Internal.RepoApi.Repos.Repositories { public class VehicleFloorPricingParametersRepository : BaseRepository, IVehicleFloorPricingParametersRepository { public VehicleFloorPricingParametersRepository(AppDbContext context) : base(context) { } public async Task> ListAllAsync() { return await _context.VehicleFloorPricingParameters.ToListAsync(); } public async Task AddAsync(VehicleFloorPricingParameters parameters) { await _context.VehicleFloorPricingParameters.AddAsync(parameters); } public async Task FindByIdAsync(int id) { return await Queryable.Where(_context.VehicleFloorPricingParameters, c => c.Id == id).FirstOrDefaultAsync(); } public void Update(VehicleFloorPricingParameters parameters) { _context.VehicleFloorPricingParameters.Update(parameters); } public void Remove(VehicleFloorPricingParameters parameters) { _context.VehicleFloorPricingParameters.Remove(parameters); } } }