// GET: Clientes/Delete/5 public ActionResult Delete(int id) { var cliente = _clienteApp.GetById(id); var clienteModel = new ClienteTransformation().TransformarClienteEmClienteModel(cliente); return(View(clienteModel)); }
public ActionResult Edit(ClienteModel clienteModel) { if (ModelState.IsValid) { var cliente = new ClienteTransformation().TransformarClienteModelEmCliente(clienteModel); _clienteApp.Update(cliente); return(RedirectToAction("Index")); } return(View(clienteModel)); }
public ActionResult Especiais() { var clientesModel = new ClienteTransformation().TransformarClienteEmClienteModel(_clienteApp.ObterClientesEspecias()); return(View(clientesModel)); }
// GET: Clientes public ActionResult Index() { var clientesModel = new ClienteTransformation().TransformarClienteEmClienteModel(_clienteApp.GetAll()); return(View(clientesModel)); }