Beispiel #1
0
 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));
 }
Beispiel #2
0
        public async Task <Rent> GetAsync(IRentIdentity rentId)
        {
            var result = await this.Get(rentId);

            return(this.Mapper.Map <Rent>(result));
        }
Beispiel #3
0
 public Task <Rent> GetAsync(IRentIdentity rent)
 {
     return(this.RentDataAccess.GetAsync(rent));
 }