public async Task <IActionResult> PutPricing(int id, Pricing pricing) { if (id != pricing.Id) { return(BadRequest()); } _context.Entry(pricing).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PricingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutBlackList(int id, BlackList blackList) { if (id != blackList.Id) { return(BadRequest()); } _context.Entry(blackList).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BlackListExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutCarCopy(int id, CarCopy carCopy) { if (id != carCopy.Id) { return(BadRequest()); } _context.Entry(carCopy).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CarCopyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task AddAsync(RentalContract obj) { await _dbContext.RentalContracts.AddAsync(obj); await _dbContext.SaveChangesAsync(); }
public async Task AddAsync(CarCategory obj) { await _dbContext.CarCategories.AddAsync(obj); await _dbContext.SaveChangesAsync(); }
public async Task AddAsync(Car obj) { await _dbContext.Cars.AddAsync(obj); await _dbContext.SaveChangesAsync(); }
public async Task AddAsync(Brand obj) { await _dbContext.Brands.AddAsync(obj); await _dbContext.SaveChangesAsync(); }
public async Task AddAsync(Reservation obj) { await _dbContext.Reservations.AddAsync(obj); await _dbContext.SaveChangesAsync(); }