Skip to content

Instantly share code, notes, and snippets.

@suryagaddipati
Created August 8, 2010 18:27
Show Gist options
  • Select an option

  • Save suryagaddipati/514379 to your computer and use it in GitHub Desktop.

Select an option

Save suryagaddipati/514379 to your computer and use it in GitHub Desktop.
protected IList<T> _FindByProperty(string propertyName , object value)
{
return _hibernateTemplate.Execute(
session => session.CreateCriteria(typeof(T)).
Add(Expression.Eq(propertyName, value)).List())
.Cast<T>().ToList();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment