Skip to content

Instantly share code, notes, and snippets.

@anujb
Created July 30, 2011 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anujb/1115225 to your computer and use it in GitHub Desktop.
Save anujb/1115225 to your computer and use it in GitHub Desktop.
ORM Example
using (var session = SessionFactory.OpenSession)
{
Names = session.QueryOver<Foo>()
.WhereRestrictionOn(f => f.Id)
.IsBetween(2).And(8)
.Select(f => f.Name)
.OrderBy(f => f.Name).Asc
.List<string>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment