Skip to content

Instantly share code, notes, and snippets.

@f1code
Created September 29, 2015 13:57
Show Gist options
  • Select an option

  • Save f1code/58d558dc6403feab0ac5 to your computer and use it in GitHub Desktop.

Select an option

Save f1code/58d558dc6403feab0ac5 to your computer and use it in GitHub Desktop.
// With Count
var count = sess.QueryOver<ITicket>()
.Where(x => (x.SentBundle == false || x.SentBundle == null)
&& x.ScheduledDate >= startDate && x.ScheduledDate <= endDate &&
(string)x.Contact.Id == (string)contact.Id)
.Select(Projections.Count("Id"))
.SingleOrDefault<int>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment