Esempio n. 1
0
 public static (Category, bool) CategoryCUD(Category category, EntityState entityState)
 {
     using (CariHesapDbEntities c = new CariHesapDbEntities())
     {
         c.Entry(category).State = entityState;
         if (c.SaveChanges() > 0)
         {
             return(category, true);
         }
         else
         {
             return(category, false);
         }
     }
 }
Esempio n. 2
0
 public static (User, bool) UserCUD(User user, EntityState entityState)
 {
     using (CariHesapDbEntities c = new CariHesapDbEntities())
     {
         c.Entry(user).State = entityState;
         if (c.SaveChanges() > 0)
         {
             return(user, true);
         }
         else
         {
             return(user, false);
         }
     }
 }
Esempio n. 3
0
 public static (Product, bool) ProductCUD(Product product, EntityState entityState)
 {
     using (CariHesapDbEntities c = new CariHesapDbEntities())
     {
         c.Entry(product).State = entityState;
         if (c.SaveChanges() > 0)
         {
             return(product, true);
         }
         else
         {
             return(product, false);
         }
     }
 }