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; } } }
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; } } }