예제 #1
0
 public bool AddPublisher(Publisher v)
 {
     db.Publishers.Add(v);
     if (!Save())
     {
         return false;
     }
     return true;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }