public ActionResult Agregar(Logro logro)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Logros.Add(logro);
             db.SaveChanges();
         }
         return RedirectToAction("Index");
     }
     catch (Exception ex)
     {
         TempData["Error"] = ex.Message;
         return View("Error");
     }
 }
 public ActionResult Editar(Logro logro)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(logro).State = EntityState.Modified;
             db.SaveChanges();
         }
         return RedirectToAction("Index");
     }
     catch (Exception ex)
     {
         TempData["Error"] = ex.Message;
         return View("Error");
     }
 }
 public ActionResult Agregar()
 {
     Logro logro = new Logro();
     return View(logro);
 }