Exemplo n.º 1
0
        public bool removeHobbyFromuser(ApplicationUser a, Hobby toDel)
        {
            UserHobbyConnection hConnection = getUserHobbyConnection(a, toDel);

            db.UserHobbyConnections.Remove(hConnection);
            return(db.SaveChanges() != 0);
        }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
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);
        }