public static bool IsOrganizedByFriendOfFriend(this Event e, Account account, IDataService ds) { var s = new EventOrganizedByFriendOfFriendQuery(account); var q = s.GetQuery().Clone() .JoinQueryOver<Account>(c => c.Organizers) .Where(a => a == account); return ds.Event.ExecuteQuery(q).RowCount() > 0; }
public static bool IsOrganizedByFriendOfFriend(this Event e, Account account, IDataService ds) { var s = new EventOrganizedByFriendOfFriendQuery(account); var q = s.GetQuery().Clone() .JoinQueryOver <Account>(c => c.Organizers) .Where(a => a == account); return(ds.Event.ExecuteQuery(q).RowCount() > 0); }
public IEnumerable <Event> GetMyFriendsOfFriendsEvents(int pageStart, int pagecount) { var q = new EventOrganizedByFriendOfFriendQuery(this.Account); var events = this.dataService.Event.ExecuteQuery(q).Skip(pageStart).Take(pagecount).List(); foreach (var e in events) { e.Permission = Permission.GetPermissions(e, ConnectionType.FriendOfFriend); e.ConnectionType = ConnectionType.FriendOfFriend; } return(events); }