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; }
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); }
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); }
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; }