Created
March 25, 2011 11:10
-
-
Save DerAlbertCom/886696 to your computer and use it in GitHub Desktop.
Simple Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var attendees = repository.GetAttendess(); | |
var registrations = repository.GetRegistrationsForMeeting(meetingId, searchTerm); | |
var query = from registration in registrations | |
join attendee in attendees on registration.WebUser equals attendee.WebUser | |
orderby registration.Updated | |
select new MeetingListProjection | |
{ | |
UserID = registration.WebUser.ID, | |
RegistrationOn = registration.RegistrationOn, | |
Date = registration.Meeting.Date.ToShortDateString(), | |
MeetingID = registration.Meeting.ID, | |
PlaceName = registration.Meeting.Place.Name, | |
Name = registration.Meeting.Name, | |
Price = registration.Fee, | |
WebUserEMail = registration.WebUser.EMail, | |
Attendant = registration.Attendant, | |
AttendeeName = attendee.LastName + " " + attendee.FirstName, | |
CompanyName = attendee.CompanyName, | |
RegistrationID = registration.ID, | |
PayedOn = registration.PayedOn, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment