EF, simply say the database of the table generated entity class, each result is an entity class set (type such as ilist<>,iqueryable<>), add and Delete change method encapsulated , direct operation, Save the Go Database tool write statements.
EF5.0 After the delay of execution, in fact, is iqueryable<> and SaveChange (), meaning you can divide the sentence into a few paragraphs, and finally only once generated.
EF is the ORM Framework (object-relational mapping), in the previous program, I often go to the database of the table generated entity classes, convenient development, the framework is more convenient, packaged and deleted and modified.
Based on ADO, will automatically generate SQL statements, depending on the database, with LINQ to write statements will be more convenient, but simple and relatively good, complex statements will often be compared (this is actually more tired)
Advantages:
Programs can use different databases, because EF generates statements based on different databases;
Can not go to the database tool (API) to write statements;.
All by the entity class to execute, no longer go to the database to find fields;
Disadvantages:
Highly concurrent programs (such as live chat) are not recommended;
Write LINQ complex point query Statements (tables, multiple subqueries, conditional mates) is very painful, and to use the tool to see whether the generated statements are logical, and can not be constantly debugging (I think the function is debugging out, the brain hole big open people can skip);
EF Replacement version is really a pit, if you want to upgrade the program's EF from the lower version to the higher version, the higher version will be less than many methods (see the data is clearly written sqlquerybydynamic ()), now know that the biggest change is 5.0
【. Net-ef "Entity Framework learning Note 4: Pros and cons