public ActionResult Edit([Bind(Include = "Id,temp,movement,time")] SENSOR_0001203B sENSOR_0001203B)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sENSOR_0001203B).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sENSOR_0001203B));
 }
 public ActionResult Edit([Bind(Include = "Id,StudentName")] Student student)
 {
     if (ModelState.IsValid)
     {
         db.Entry(student).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(student));
 }
示例#3
0
 public ActionResult Edit([Bind(Include = "ID,Name,Attending,GuestNumber,FoodItems,Allergies,Comments")] RSVP rSVP)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rSVP).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(rSVP));
 }
 public ActionResult Edit([Bind(Include = "Id,uid,threshold")] SENSOR sENSOR)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sENSOR).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sENSOR));
 }
 public ActionResult Edit([Bind(Include = "pId,ProgranName,Prerequisites,Ouac,MinGrade,School")] Program program)
 {
     if (ModelState.IsValid)
     {
         db.Entry(program).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(program));
 }
示例#6
0
 public virtual void Update(T entity)
 {
     dbSet.Attach(entity);
     dataContext.Entry(entity).State = EntityState.Modified;
 }