In my previous employment I used Hibernate in combination with Spring but now i ham using nHibernate as I am doing some .net work, and i am having some problems keeping my .net DAOs as clean as my Java ones were.
As my knowlegde of both Hibernate\Spring and nHibernate is average at best i just want to check if i could be doing things in a simulare way as i did in Java
Basically in my Java apps i would have a BaseDAO (which extended HibernateDaoSupport from the SpringFramework) which would handle all the main interactions with Hibernate it would have generic add, delete, update, and find fuctions, which my specfic objectDAOs could call.
So far i have pretty much followed this using c#.net, without the spring elements, and have made generic create and update functions in my BaseDAO, but im a litte stuck when it comes to the find funtionlity......there does not seem to be a generic way of using this. In the Java world i would use named queries in my mapping file with '?' in the hql where i wanted the parameters, i would then pass the named query and the params to the BaseDAO and it would do the work. As there are no named queries? im a little stuck....could i progress in a different way?
|