public List <Connection> GetNewConnectReq() { var connects = MyConnects .Where(c => c.IsRequestSend && c.ReceiverId == UserId) .ToList(); return(connects); }
public List <int> GetConnectReqIds(ConnectStatusType status) { var connects = MyConnects .Where(c => c.Status == status); var ids = connects .SelectMany(c => new List <int> { c.SenderId, c.ReceiverId }) .ToList(); ids.RemoveAll(i => i == UserId); return(ids); }