Beispiel #1
0
 public List <short> RequestFriendList(short accountId)
 {
     using (UserModelContainer context = new UserModelContainer())
     {
         IQueryable <FriendList> myFriendList       = context.FriendListSet;
         List <short>            mySecondFriendList = (
             from g in myFriendList
             where g.AccountIdOne == accountId
             select g.AccountIdTwo).ToList();
         return(mySecondFriendList);
     }
 }
Beispiel #2
0
 public string TranslateUserId(short accountId)
 {
     using (UserModelContainer context = new UserModelContainer())
     {
         IQueryable <Account> userAccounts = context.AccountSet;
         string username = (
             from g in userAccounts
             where g.Id == accountId
             select g.Username).FirstOrDefault();
         return(username);
     }
 }