I'm using .Net enterprise library data access application block for my Data Access layer design.
In my Category DAL class, I've methods like :
GetProductsInCategory(int CatId), GetAllProducts, GetCategories, etc.
My question is: where do i put this line of code ?
DatabaseFactory.CreateDatabase("MyDB");
shall i put it in every method above or shall i have a base class which would return Database object to my DAL class.
Also, shall i keep these DAL class methods as static?
Thanks.