示例#1
0
        public List <UserOrFriendModel> GetStatusFriends(string login)
        {
            List <UserOrFriendModel> sortUser = new List <UserOrFriendModel>();
            Account account     = accountService.GetMyAccount(login, null, "Name");
            var     sortFriends = db.Friends.ToList();
            var     allUsers    = accountService.GetList();

            if (account != null)
            {
                foreach (var item in allUsers)
                {
                    if (item.Id != account.Id)
                    {
                        sortUser.Add(new UserOrFriendModel {
                            Id = item.Id, Username = item.AccountName
                        });
                    }
                }
            }
            return(GetUserStatusByMyAccount(account.Id, sortUser, sortFriends));
        }