private async Task <CarSharing.DataAccess.Entities.Rent> Get(IRentIdentity rentId) { if (rentId == null) { throw new ArgumentNullException(nameof(rentId)); } return(await this.Context.Rent.Include(x => x.Company).Include(x => x.Car).FirstOrDefaultAsync(x => x.Id == rentId.Id)); }
public async Task <Rent> GetAsync(IRentIdentity rentId) { var result = await this.Get(rentId); return(this.Mapper.Map <Rent>(result)); }
public Task <Rent> GetAsync(IRentIdentity rent) { return(this.RentDataAccess.GetAsync(rent)); }