public void AddContacto(modContacto model) { var id = (from z in bd.Contacto orderby z.id descending select z.id + 1).FirstOrDefault(); model.ID = id; bd.AddToContacto(model.contactoDB); bd.SaveChanges(); }
// // GET: /Contacto/ public ActionResult Index() { ViewBag.MenuSeleccionado = "CONTACTO"; var model = new modContacto(); return View(model); }
public void Enviar(modContacto model) { var servContacto = new ContactoService(); model.Leido = false; servContacto.AddContacto(model); }