Пример #1
0
 // update a review
 public Review Edit(Review review)
 {
     db.Entry(review).State = EntityState.Modified;
     db.SaveChanges();
     return(review);
 }
Пример #2
0
 // delete a review
 public void Remove(Review review)
 {
     db.Reviews.Remove(review);
     db.SaveChanges();
 }
Пример #3
0
 // save a review
 public Review Save(Review review)
 {
     db.Reviews.Add(review);
     db.SaveChanges();
     return(review);
 }