Exemple #1
0
 public static List<string> getUsersHobbies(Int64 currentUser)
 {
     using (DBEntities dbConnection = new DBEntities())
     {
         List<string> usersHobbies = new List<string>();
         usersHobbies.Add("");
         foreach (var a in dbConnection.getUsersHobbiesSP(currentUser))
         {
             usersHobbies.Add(a);
         }
         return usersHobbies;
     }
 }
Exemple #2
0
 //returns the hobbies from a specific user as a stringlist
 public static List<string> getUsersHobbies(Int64 currentUser)
 {
     using (DBEntities dbConnection = new DBEntities())
     {
         List<string> usersHobbies = new List<string>();
         //getUsersHobbiesSP is a stored procedure mapped by the entity framework
         foreach (var a in dbConnection.getUsersHobbiesSP(currentUser))
         {
             usersHobbies.Add(a);
         }
         return usersHobbies;
     }
 }