Skip to content

Instantly share code, notes, and snippets.

@dagda1
Created November 9, 2011 10:12
Show Gist options
  • Save dagda1/1351030 to your computer and use it in GitHub Desktop.
Save dagda1/1351030 to your computer and use it in GitHub Desktop.
NH.cs
public virtual IList<Plan> GetPlansForBusinessUnits(Guid[] businessUnitUids)
{
using (var session = _sessionManager.OpenSession())
{
return session.QueryOver<Plan>()
.Where(Restrictions.On<Plan>(x => x.BusinessUnit.Uid)
.IsIn(businessUnitUids))
.List()
.OrderBy(x => x.Title).ToList();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment