Method | Description | |
---|---|---|
ARProductDataAccess ( ISessionFactory sessionFactory ) : System |
As you probably know the ISessionFactory is a NHibernate interface. As we're using ActiveRecord integration facility its implementation (at least the one we will get here) is provided by the facility and the only method available is OpenSession(). This allow the facility to provide automatic transaction management and others goodies.
|
|
Find ( int productId ) : |
||
FindAll ( ) : PetStore.Model.Product[] | ||
FindByCategory ( int category ) : PetStore.Model.Product[] | ||
GetProductIds ( ) : int[] |
We need to return only the ids here, and there are a bunch of options. We choose to use a NH query through ActiveRecord
|
public ARProductDataAccess ( ISessionFactory sessionFactory ) : System | ||
sessionFactory | ISessionFactory | |
return | System |
public Find ( int productId ) : |
||
productId | int | |
return |
public FindAll ( ) : PetStore.Model.Product[] | ||
return | PetStore.Model.Product[] |
public FindByCategory ( int category ) : PetStore.Model.Product[] | ||
category | int | |
return | PetStore.Model.Product[] |