I picked my head up today from what I've been focused on and took a look at my blog feeds and was happy to see that Jarek Kowalski had a new post. He doesn't write a lot of blog posts, but they are generally pretty juicy.
This one didn't disappoint.
Persistence Ignorance (POCO) Adapter for Entity Framework V1
He has been hammering out a way to implement POCO in Entity Framework v1 which involves a custom code generator that adds in some extra wrappers into the generated classes as well as some new APIs. His solution is called EFPocoAdapter.
One of the big problems for POCO is that you can't do much without the ObjectContext which means that you are tied to the EF APIs. For Unit Testing you can't fake the query (though TypeMock is working on an EF sample) which means you can't do tests without hitting the database.
One of the cool things Jarek has done is split out the EntitySets and given it the ability to do change tracking for you.
And some of the work he's done leverages the EF Extensions that COlin Meek created earlier this year.
It's all very interesting and though I'd love to dig into it, I can't at the moment.
Jarek has a nice long post explaining how he worked out the sample. EFPocoAdapter is available on CodeGallery. My RSS feed for the ADO.NET Team's code gallery indicated that there was an update there also. Now I know what it was.


