Exemplo n.º 1
0
 public bool AddDirection(ProjectDirection direction)
 {
     using (var db = new ActiveCitizenContext())
     {
         db.ProjectDirection.Add(direction);
         return(db.SaveChanges() > 0);
     }
 }
Exemplo n.º 2
0
 public bool DeleteDirection(ProjectDirection direction)
 {
     using (var db = new ActiveCitizenContext())
     {
         db.Remove(db.ProjectDirection.Find(direction.Id));
         return(db.SaveChanges() > 0);
     }
 }
Exemplo n.º 3
0
 public bool UpdateDirection(ProjectDirection direction)
 {
     using (var db = new ActiveCitizenContext())
     {
         db.Entry(db.ProjectDirection.Find(direction.Id)).CurrentValues.SetValues(direction);
         return(db.SaveChanges() > 0);
     }
 }