public ActionResult EditPublicHouse(PublicHouseViewModel publicHouse) { if (publicHouse.Name == null) { return(HttpNotFound()); } publicHouseService.Update(publicHouse); return(Json(publicHouse)); }
public IActionResult Put(int id, [FromBody] PublicHouseViewToUpdate publicHouse) { if (ModelState.IsValid) { _service.Update(publicHouse); return(Ok(publicHouse)); } return(BadRequest(ModelState)); }
public ActionResult Update(PublicationHouseViewModel publicationHouse) { _publicationHouseService.Update(publicationHouse); return(RedirectToAction("Index")); }