public IActionResult UpdateEmpresa(Endereco model) { if (!ModelState.IsValid) { return(View(model)); } using (EnderecoData data = new EnderecoData()) data.Update(model); return(RedirectToAction("IndexEmpresa", "Pedido")); }
public IActionResult Update(Endereco model) { model.Id = 3; if (!ModelState.IsValid) { return(View(model)); } using (EnderecoData data = new EnderecoData()) data.Update(model); return(RedirectToAction("Index", "Home")); }