Example #1
0
 public FriendService()
 {
     dc= new SPKTDataContext();
     _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _webContext = new SPKTCore.Core.Impl.WebContext();
     _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
     _friendRepository = new SPKTCore.Core.DataAccess.Impl.FriendRepository();
     _userSession = new SPKTCore.Core.Impl.UserSession();
 }
Example #2
0
 public List<Account> SearchFriend(Account account)
 {
     SPKTDataContext dc=new SPKTDataContext();
     List<Account> list = new List<Account>();
     foreach (Account a in dc.Accounts)
     {
         if (IsFriend(a, account) == true || IsFriend(account, a) == true)
             list.Add(a);
     }
     return list;
 }
Example #3
0
 public SPKTDataContext GetContext()
 {
     SPKTDataContext spktDC = new SPKTDataContext(ConnectionString);
     spktDC.DeferredLoadingEnabled = false;
     return spktDC;
 }