public void InsertOrUpdate(PROYECTO_DETALLES proyecto_detalles)
 {
     if (proyecto_detalles.ID == default(decimal)) {
         // New entity
         context.PROYECTO_DETALLES.Add(proyecto_detalles);
     } else {
         // Existing entity
         context.Entry(proyecto_detalles).State = EntityState.Modified;
     }
 }
 public ActionResult Create(PROYECTO_DETALLES proyecto_detalles)
 {
     if (ModelState.IsValid) {
         proyecto_detallesRepository.InsertOrUpdate(proyecto_detalles);
         proyecto_detallesRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View();
     }
 }