Beispiel #1
0
 public ActionResult Edit([Bind(Include = "id,name,quantity,price")] medicine medicine)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medicine).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(medicine));
 }
 public ActionResult Edit([Bind(Include = "UserID,FirstName,LastName,EmailID,DateOfBirth,Password,IsEmailVertified,ActivationCode,Username")] pharmacist pharmacist)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pharmacist).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pharmacist));
 }