Jaroslaw Kowalski has a great post on the EFPocoAdapter, which is a sample that includes a code generator and a supporting library that implements POCO object tracking on top of Entity Framework V1.
As Jaroslaw points out, there is a lot of persistence and object tracking information that needs to be added to your business objects when using the Entity Framework in the form of interfaces, attributes, and specialized classes to assist with lazy-loading, etc.
Whether you are concerned with your business object's being Plain Old CLR Objects or not, I think it is good to have an understanding of the pros and cons of constructing a persistence ignorance architecture for your .NET Applications.
The EFPocoAdapter sample was created for a couple of reasons:
- To demonstrate that it is possible to track POCO objects using the current version of EF
- To gather feedback on POCO-specific features (such as transparent lazy loading, immutable objects, change detection, etc) that customers would like to see implemented natively in future versions of Entity Framework.
I high recommend reading Jaroslaw's post and downloading the EFPocoAdapter Sample.