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