Home

Castle Stronghold

Generic Dao

A fellow Castle user, Steve Degosserie, has shared his implementation of NHibernateGenericDao. Follows a list of operations it implements:


Array FindAll(Type type)

Array FindAll(Type type, int firstRow, int maxRows)

object FindById(Type type, object id)

object Create(object instance)

object Update(object instance)

object Delete(object instance)

void Save(object instance

void DeleteAll(Type type)

Array FindAll(Type type, ICriterion[] criterias)

Array FindAll(Type type, ICriterion[] criterias, int firstRow, int maxRows)

Array FindAll(Type type, ICriterion[] criterias, Order[] sortItems)

Array FindAll(Type type, ICriterion[] criterias, Order[] sortItems, int firstRow, int maxRows)

Array FindAllWithCustomQuery(string queryString)

Array FindAllWithCustomQuery(string queryString, int firstRow, int maxRows)

Array FindAllWithNamedQuery(string namedQuery)

Array FindAllWithNamedQuery(string namedQuery, int firstRow, int maxRows)

void InitializeLazyProperties(object instance)

void InitializeLazyProperty(object instance, string propertyName) 
Google
Search WWW Search castleproject.org