public ActionResult Edit(Medications medications)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medications).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(medications);
 }
        public ActionResult Create(Medications medications)
        {
            if (ModelState.IsValid)
            {
                db.Medications.Add(medications);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(medications);
        }