Skip to content

Instantly share code, notes, and snippets.

@DerAlbertCom
Created March 25, 2011 11:10
Show Gist options
  • Save DerAlbertCom/886696 to your computer and use it in GitHub Desktop.
Save DerAlbertCom/886696 to your computer and use it in GitHub Desktop.
Simple Query
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