예제 #1
0
 public bool addHobbyToStatus(Status s, Hobby toAdd)
 {
     StatusHobbyConnection sConnection = new StatusHobbyConnection();
     sConnection.StatusID = s.ID;
     sConnection.HobbyID = toAdd.ID;
     db.StatusHobbyConnections.Add(sConnection);
     return db.SaveChanges() != 0;
 }
예제 #2
0
        public bool removeHobbyFromStatus(Status s, Hobby toDel)
        {
            StatusHobbyConnection sConnection = new StatusHobbyConnection();

            sConnection.StatusID = s.ID;
            sConnection.HobbyID  = toDel.ID;
            db.StatusHobbyConnections.Remove(sConnection);
            return(db.SaveChanges() != 0);
        }
예제 #3
0
        public bool addHobbyToStatus(Status s, Hobby toAdd)
        {
            StatusHobbyConnection sConnection = new StatusHobbyConnection();

            sConnection.StatusID = s.ID;
            sConnection.HobbyID  = toAdd.ID;
            db.StatusHobbyConnections.Add(sConnection);
            return(db.SaveChanges() != 0);
        }
예제 #4
0
 public bool removeHobbyFromStatus(Status s, Hobby toDel)
 {
     StatusHobbyConnection sConnection = new StatusHobbyConnection();
     sConnection.StatusID = s.ID;
     sConnection.HobbyID = toDel.ID;
     db.StatusHobbyConnections.Remove(sConnection);
     return db.SaveChanges() != 0;
 }