POCOs (Plain old CLR objects) are just objects in your domain. Usually, when we use the entity infrastructure, entities are automatically generated for you. This is great, but unfortunately these objects alternate with database access functionality, which is clearly contrary to SOC (Separation of Anxiety). POCOs are simple objects without any data access functions, but EntityObject functions, such as
- Lazy loading
- Change tracking
Here is a good start for this.
POCO Entity Structure
You can also easily create POCO from an existing Entity infrastructure project using code generators.
EF 5.X DbContext Code Generator
Prabhu Murthy Apr 18 '13 at 5:44 on 2013-04-18 05:44
source share