Пример #1
0
 public static (Koltuk, bool) Update(Koltuk koltuk)
 {
     using (TrenEntities t = new TrenEntities())
     {
         t.Entry(koltuk).State = System.Data.Entity.EntityState.Modified;
         if (t.SaveChanges() > 0)
         {
             return(koltuk, true);
         }
         else
         {
             return(koltuk, false);
         }
     }
 }
Пример #2
0
 public static (Sefer, bool) Update(Sefer s)
 {
     using (TrenEntities t = new TrenEntities())
     {
         t.Entry(s).State = System.Data.Entity.EntityState.Modified;
         if (t.SaveChanges() > 0)
         {
             return(s, true);
         }
         else
         {
             return(s, false);
         }
     }
 }