So we are building an application with a
- UI Layer (web, mobile, Ajax client, etc)
- Service/API Layer
- Business Logic Layer
- Data Access Layer
Our goal is to have an Entity Framework dependency from the Service Layer on down to the DAL. That means the Sevice layer will only accept and return POCOs (plain old CLR objects).
What we're currently doing is manually coding a mapping layer between the service layer and business logic layer that will convert POCOs to EF Entities and vice versa.
So in short, page has form, form has codebehind that takes form contents, stuffs them into a POCO, sends it to service layer. Service layer converts to EF Entity, sends it to Business Logic Layer which performs certain transformations to the entity, and then interacts with the DAL to get it persisted.
Yes, its a bit tedious, but we were wondering if theres a better way?
Yes, I know someone published an EF Poco Adapter but it's all in C# and we would prefer a VB.NET solution.
Yes, Switching to NHibernate is an option of last resort, as we are already deep into our development cycle.