17 lines
481 B
C#
17 lines
481 B
C#
using ReserveManagementSystemLib.Models;
|
|
using ReserveManagementSystemLib.Persistence;
|
|
|
|
namespace ReserveManagementSystemLib.Repositories
|
|
{
|
|
public class VehicleRepository : BaseRepository, IVehicleRepository
|
|
{
|
|
public VehicleRepository(AppDbContext context) : base(context) { }
|
|
|
|
public async Task<Vehicle> FindByLoanIdAsync(int? loanId)
|
|
{
|
|
return await _context.Vehicles.FirstOrDefaultAsync(v => v.LoanId == loanId);
|
|
}
|
|
|
|
}
|
|
}
|