Repository pattern: Dynamic class generation
I would like to implement the repository pattern, having my domain classes being independent from my repository implementation.
but maintain my domain classes -on schema updates using EF for example- is really expe开发者_C百科nsive.
Do you know someway to automatize domain classes updates based on the ORM classes? -using T4 templates or something similar...
Now i don't know if you are working with EF 4, but in that case Poco templates have recently been released on the Ado.Net Team Blog
One solution is to use a tool like Automapper.
精彩评论