public bool AddTextbook(Textbook v) { db.Textbooks.Add(v); if (!Save()) { return false; } return true; }
public bool AddTextbook(Textbook v) { db.Textbooks.Add(v); if (!Save()) { return(false); } return(true); }
public bool RemoveTextbook(Textbook v) { if (!db.Textbooks.Local.Contains(v)) { db.Textbooks.Attach(v); } db.Textbooks.Remove(v); if (!Save()) { return false; } return true; }
public bool UpdateTextbook(Textbook v) { if (!db.Textbooks.Local.Contains(v)) { db.Textbooks.Attach(v); } db.Entry <Textbook>(v).State = EntityState.Modified; if (!Save()) { return(false); } return(true); }
public bool RemoveTextbook(Textbook v) { if (!db.Textbooks.Local.Contains(v)) { db.Textbooks.Attach(v); } db.Textbooks.Remove(v); if (!Save()) { return(false); } return(true); }
public bool UpdateTextbook(Textbook v) { if (!db.Textbooks.Local.Contains(v)) { db.Textbooks.Attach(v); } db.Entry<Textbook>(v).State = EntityState.Modified; if (!Save()) { return false; } return true; }