In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "how to use ADO.NET 's Entity Framework tool". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use ADO.NET 's Entity Framework tool.
C # 3.0 introduces some new features, such as Extension Method, Lambda Expression, ADO.NET Entity Framework.
In fact, these new features are used to serve Linq. Linq To SQL frees programmers from writing a large number of sql query statements, values and assignments in the past, and does a lot of work on intellisense and compilation, so that these queries can be checked at compilation time. At the same time, Microsoft launched ADO.NET Entity Framework, the next generation of ADO.NET. It is a more powerful ORM than Linq To SQL, allowing developers to focus only on the development of domain object models, regardless of how they interact with relational databases.
This article uses a simple example to show how Entity Framework is used. Before that, you must download ADO.NET Entity Framework runtime and tools, and official downloads have been provided with many examples. Here's the official start of the ADO.NET Entity Framework journey (development tool VS 2008 beta, take the Northiwind database as an example).
First create a Console project (to select .NET Framework 3.5), then click Add New Item to see the ADO.NET Entity Data Model option:
Then there will be ADO.NET Entity Framework, select database, select tables, views, stored procedures, etc., and follow the wizard step by step, where only Customers and Orders tables are selected. Click Northwind.edmx in the Solution Explore view to see the information about Entity (which looks a lot like Linq To SQL's dbml design view), and then rename them Customer and Order.
In the entity framework, we can query through ADO.NET Entity Framework, which is used in the same way as SqlCommand in ADO.NET. The difference is that SqlCommand uses standard SQL statements to query the database, while EntityCommand uses Entity SQL to query EntityContainer, and of course the final entity framework converts Entity SQL into standard SQL statements to query the database.
At this point, I believe you have a deeper understanding of "how to use ADO.NET 's Entity Framework tools". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.