public ActionResult Delete(int Id) { var model = _service.GetAccomodationTypeById(Id); var viewModel = new AccomodationTypesCreateModel() { ID = model.ID, Name = model.Name, Description = model.Description }; return(PartialView("_Delete", viewModel)); }
public ActionResult Edit(int ID) { var result = _service.GetAccomodationTypeById(ID); if (result == null) { return(HttpNotFound()); } else { var viewModel = new AccomodationTypesCreateModel(result); return(PartialView("_Action", viewModel)); } }
public ActionResult Create() { var viewModel = new AccomodationTypesCreateModel(); return(PartialView("_Action", viewModel)); }