public ActionResult Edit(RoomTypeDto roomTypeDto) { if (ModelState.IsValid) { _roomTypeService.Edit(roomTypeDto); return(RedirectToAction("getall", "RoomType")); } return(View(roomTypeDto)); }
public async Task <IActionResult> Edit(int id, RoomTypeEditInputModel roomTypeEditInputModel) { if (!ModelState.IsValid) { return(View(roomTypeEditInputModel)); } RoomTypeServiceModel roomTypeServiceModel = AutoMapper.Mapper.Map <RoomTypeServiceModel>(roomTypeEditInputModel); await roomTypeService.Edit(id, roomTypeServiceModel); return(Redirect("/Administration/RoomType/All")); }
public void Edit(RoomType entity) { _roomTypeService.Edit(entity); }