Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have just started learning entity framework for .net 4.0. But I didn't understand the need of POCO(Plain Old CLR Object) in it.

Please let me know the need of POCO with some good example if you have any idea. Waiting for your response. Thanks in advance..:):)
Posted

1 solution

a good starting point is here:
http://blogs.msdn.com/b/adonet/archive/2009/05/21/poco-in-the-entity-framework-part-1-the-experience.aspx[^]

and here:

http://thedatafarm.com/blog/data-access/agile-entity-framework-4-repository-part-1-model-and-poco-classes/[^]

POCO's are used all over the place and commonly used as DTO's (Data transfer objects) via data services. POCO's are literally objects that just have properties which are populated via routines. The POCO properties will / should only have well known .net types such as string, int, double etc...

added to the above, used with the Repository and Unit of Work pattern these "Basic" objects will be extreamly important to data operations.
http://huyrua.wordpress.com/2010/07/13/entity-framework-4-poco-repository-and-specification-pattern/[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900