public ActionResult Put(int id, [FromBody] ContaLuz entity) { var imovel = imovelRepository.GetByID(entity.idimovel); if (imovel != null) { entity.imovel = imovel; } repository.Update(entity); return(Ok(new { status = "200", msg = "OK", obj = entity })); }
public RedirectToActionResult Update(ContaLuz contaLuz) { contaLuzRepository.Update(contaLuz); return(RedirectToAction("Index")); }
public RedirectToActionResult Update(ContaLuz entity) { entity.imovel = imovelRepository.GetByID(entity.imovel.id); contaLuzRepository.Update(entity); return(RedirectToAction("Index")); }