public ActionResult DeleteConfirmed(int id)
        {
            Medical_Profile medical_Profile = db.Medical_Profile.Find(id);

            db.Medical_Profile.Remove(medical_Profile);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Weight,Height,Goal_of_diet,Exercise_Time,Leve_of_Exercise,Daily_Food,Vitamins,Problem_History,User")] Medical_Profile medical_Profile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medical_Profile).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(medical_Profile));
 }
        public ActionResult Create([Bind(Include = "Id,Weight,Height,Goal_of_diet,Exercise_Time,Leve_of_Exercise,Daily_Food,Vitamins,Problem_History,User")] Medical_Profile medical_Profile)
        {
            if (ModelState.IsValid)
            {
                medical_Profile.User = User.Identity.GetUserId();
                db.Medical_Profile.Add(medical_Profile);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(medical_Profile));
        }
        // GET: Medical_Profile/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Medical_Profile medical_Profile = db.Medical_Profile.Find(id);

            if (medical_Profile == null)
            {
                return(HttpNotFound());
            }
            return(View(medical_Profile));
        }