public bool AddPublisher(Publisher v) { db.Publishers.Add(v); if (!Save()) { return false; } return true; }
public bool RemovePublisher(Publisher v) { if (!db.Publishers.Local.Contains(v)) { db.Publishers.Attach(v); } db.Publishers.Remove(v); if (!Save()) { return false; } return true; }
public bool UpdatePublisher(Publisher v) { if (!db.Publishers.Local.Contains(v)) { db.Publishers.Attach(v); } db.Entry<Publisher>(v).State = EntityState.Modified; if (!Save()) { return false; } return true; }