It is one kind of a good package Microsoft ADO.NET entity data model, the application mapped to the database structure to ORM mode.
advantage:
1. Simple Linq to Sql statement greatly enhanced developer productivity, not to write complex sql statement;
2. no longer need to pipe the application how to connect to the database;
3.EF can be used for data services and infrastructure of OData Service;
Disadvantages:
1. Since then linq statement is compiled sql, sql statement for this automatically generated can not be controlled;
2.EF operating mechanism will consume a lot of memory, greatly reducing the efficiency program, resulting in reduced user experience on the client side;
3. Once the data structure changes, the need to update the EF data model; and sometimes may not find the updated entity like this happens;
Lambda expressions
lambda: anonymous function, that function without a name, in short, it will be a block of code assigned to a variable directly to the lambda as a parameter to the function. This makes the code more clean.
The following mind mapping speak, when to use, as well as the benefits of using lambda expressions.
For chestnut:
The following is a comparison of the lambda expression and the code is not used:
Is not neat, short a lot?
When there is a very simple method, we can use this method to delete, written in the form of an anonymous function to pass parameters.
Integrated Query LINQ
spelling: Language Integrated Query-- Language Integrated Query
LINQ advantages:
LINQ query and SQL query sequence:
LINQ to query from the advantages of:
As written later from p in persons, not sure before the p type, so the age of the property does not like intelligence tips.
link first to write from, the more the advantages of IntelliSense (intelisence) of.
The advantage of using the EF