示例#1
0
 public static bool Update(Credits credit)
 {
     using (FotografPaketiEntities db = new FotografPaketiEntities())
     {
         try
         {
             db.Entry(credit).State = System.Data.Entity.EntityState.Modified;
             db.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
             throw;
         }
     }
 }
示例#2
0
 public static bool Insert(Credits credit)
 {
     using (FotografPaketiEntities db = new FotografPaketiEntities())
     {
         try
         {
             credit.Status = false;
             db.Credits.Add(credit);
             db.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
             throw;
         }
     }
 }