POCO stands for "Plain Old CLR Object" Here CLR means Common Language Rutime that includes dotnet supported languages like C#, VB etc.
A Plain Old CLR Objects (POCO) is a class that doesn't depend on any framework-specific base class. It is like any other normal .Net class; that is why they are called “Plain Old CLR Objects”. These POCO entities support most of the same LINQ queries as Entity Object derived entities.
POCO allows you to write your own entity classes in a persistence ignorant fashion. POCO is also called as Persistence ignorant objects .
Persistence ignorance means that, as much as possible, anything in your code operating at the business logic layer or higher knows nothing about the actual design of the database, what database engine you're running, or how or when objects get retrieved from or persisted to the database. In the case of the EF, persistence ignorance is attained by working on POCO's and using LINQ to perform queries (i.e., not requiring the user to create any SQL queries to retrieve the desired objects).
There is still the need for you to “plug in” persistence and EF so that your POCO entities can be take from the database and updated back to the database. In order to do this, you will still need to either create an Entity Data Model using the Entity Framework Designer
0 Comment to "What is POCO in Entity Framework"
Post a Comment