public static void DeleteAll()
        {
            MariosSpecialtyProductsContext db = new MariosSpecialtyProductsContext();

            db.Products.RemoveRange(db.Products.ToList());

            db.SaveChanges();
        }
Exemple #2
0
 public Review Edit(Review review)
 {
     db.Entry(review).State = EntityState.Modified;
     db.SaveChanges();
     return(review);
 }
 public Product Edit(Product product)
 {
     db.Entry(product).State = EntityState.Modified;
     db.SaveChanges();
     return(product);
 }