public bool removeHobbyFromuser(ApplicationUser a, Hobby toDel) { UserHobbyConnection hConnection = getUserHobbyConnection(a, toDel); db.UserHobbyConnections.Remove(hConnection); return(db.SaveChanges() != 0); }
public bool addHobbyToUser(ApplicationUser a, Hobby toAdd) { UserHobbyConnection hConnection = new UserHobbyConnection(); hConnection.UserID = a.Id; hConnection.HobbyID = toAdd.ID; db.UserHobbyConnections.Add(hConnection); return db.SaveChanges() != 0; }
public bool addHobbyToUser(ApplicationUser a, Hobby toAdd) { UserHobbyConnection hConnection = new UserHobbyConnection(); hConnection.UserID = a.Id; hConnection.HobbyID = toAdd.ID; db.UserHobbyConnections.Add(hConnection); return(db.SaveChanges() != 0); }