public IActionResult Add(RentedCarsRecord record) { if (ModelState.IsValid) { var addedRecord = _rentedCarsRecordService.GetById(record.Id); if (addedRecord != null) { TempData["message"] = "This record already added to database !"; return(RedirectToAction("Index", "RentedCarRecord")); } _rentedCarsRecordService.Add(record); TempData["message"] = "Record added to database succesfully !"; return(RedirectToAction("Index", "RentedCarsRecord")); } return(View()); }
public void Delete(RentedCarsRecord rentedCarsRecord) { _rentedCarsRecordDal.Delete(rentedCarsRecord); }
public void Update(RentedCarsRecord rentedCarsRecord) { _rentedCarsRecordDal.Update(rentedCarsRecord); }
public void Add(RentedCarsRecord rentedCarsRecord) { _rentedCarsRecordDal.Add(rentedCarsRecord); }