Ejemplo n.º 1
0
 public ActionResult Create(DETALLE_TIPOS detalle_tipos)
 {
     if (ModelState.IsValid) {
         detalle_tiposRepository.InsertOrUpdate(detalle_tipos);
         detalle_tiposRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View();
     }
 }
Ejemplo n.º 2
0
 public void InsertOrUpdate(DETALLE_TIPOS detalle_tipos)
 {
     if (detalle_tipos.ID == default(decimal)) {
         // New entity
         context.DETALLE_TIPOS.Add(detalle_tipos);
     } else {
         // Existing entity
         context.Entry(detalle_tipos).State = EntityState.Modified;
     }
 }