Skip to content

Instantly share code, notes, and snippets.

@Itslet
Created October 31, 2010 08:52
Show Gist options
  • 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