public ActionResult Edit(Nutriologo model) { var newNutriologo = repo.LeerNutriologo(model.Correo, model.Nombre); if (model == null) { return(NotFound()); } try { // TODO: Add update logic here newNutriologo.Pacientes = model.Pacientes; newNutriologo.Telefono = model.Telefono; newNutriologo.Direccion = model.Direccion; var resultado = repo.ActualizarNutriologo(newNutriologo); System.Threading.Thread.Sleep(800); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
public ActionResult Create(Nutriologo model) { try { var resultado = repo.CrearNutriologo(model); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
// GET: Nutriologo/Create public ActionResult Create() { var model = new Nutriologo(); return(View(model)); }