views:

27

answers:

0

I'm currently using NetTiers for all data access operations. While it is easy to use, it is a major pain to deal with template updates and regenerating DAL especially on large and constantly evolving projects. Aside from that, NetTiers is database-centric, not model-centric which is where i'd like to be. What i would like to do is try out NHibernate with the ability to go back to NetTiers if things don't play out so well. My first concern is creating a truly generic Repository pattern. I've been reading a lot about Repository & Specification pattern, however this approach is coupled with LINQ, which isn't supported in NetTiers. I love the idea of specifications replacing bloated GetMeXYZ repositories and what i'm trying to do is figure out how to make specifications work in non-linq-capable frameworks.

I was thinking about creating a fluent predicate to build the where clause for such data access frameworks. Here is a sample of how it would be used:

new Predicate().Equals("column", value).And.IsIn("column", values)

While this would work, i don't know if this would even be enough for specifications. Another approach i see is using ExpressionVisitor to evaluate expressions to SQL, but this sounds like a major deal.

Does anyone have better ideas?

Thanks.