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