Skip to content

Instantly share code, notes, and snippets.

@Itslet
Created October 31, 2010 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Itslet/656320 to your computer and use it in GitHub Desktop.
Save Itslet/656320 to your computer and use it in GitHub Desktop.
//
// GET: /Person/
public ActionResult Index()
{
var session = FeestBeest.Web.MvcApplication.SessionFactory.GetCurrentSession();
using (session.BeginTransaction())
{
var persons = session.CreateCriteria(typeof(Person))
.List<Person>();
foreach (var p in persons)
{
Response.Write(p.GivenName + "<br />");
}
}
return View();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment