Bottom Tier Architecture

Mar 8, 2010 at 3:39 PM

I've opted to go with the new EF4 STEs.  This is the first time I've not created my own POCO DTOs.  So far, the template generator leaves a little be desired.  Ya, it generates the templates, but you have to move them manually into a common assembly to be shared between the client and services.  This feat requires a little bit of unintuitive knowledge, such as messing with the custom tool generator properties on the template file, linking files in other projects and cleaning up automatically generated classes.

The second bit that I'm struggling with is the Repository.  The Repository concept is typically used for POCOs.  These STEs are POCOs but because they are new, there's isn't a ton of documentation on them and I've definately not seen a Respotiory Pattern in any example I've seen.  I'm worried that the Generic approach doesn't fully take advantage in eliminating that additional DB call that is common with EF Updates, and marking each field modified before updating even when a field has not actually been modified.

I haven't tested this at all yet, so I'm not sure if my approach works at all or needs to be refined any.