public ActionResult Modificar(Tipo tp)
 {
     if (ModelState.IsValid)
     {
      db.Entry(tp).State=EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(tp);
 }
        public ActionResult Alta(Tipo model)
        {
            if (ModelState.IsValid)
            {
                db.Tipo.Add(model);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return RedirectToAction("Index");
        }