public ActionResult Edit(Pessoa p) { try { // TODO: Add update logic here return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Create(Pessoa p) { if (ModelState.IsValid) { try { // TODO: Add insert logic here return RedirectToAction("Index"); } catch { return View(); } } else { return View(); } }
/// <summary> /// Deprecated Method for adding a new object to the Pessoas EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPessoas(Pessoa pessoa) { base.AddObject("Pessoas", pessoa); }
/// <summary> /// Create a new Pessoa object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="nome">Initial value of the Nome property.</param> public static Pessoa CreatePessoa(global::System.Int32 id, global::System.String nome) { Pessoa pessoa = new Pessoa(); pessoa.Id = id; pessoa.Nome = nome; return pessoa; }