Install Entity Framework (EF basics Series 4), entityef

Source: Internet
Author: User

Install Entity Framework (EF basics Series 4), entityef
Entity Framework 5.0 APIs are distributed in two places: NuGet and. NET Framework, this. NET framework 4.0/4.5 contains the core API of EF, but the EntityFramework obtained through the NuGet package. dll contains special features of EF 5.0; EF6.0 is not separated:

In this basic series of courses, I will use EF 6.0, the latest EF version to learn EF. First install the following tool :. NET Framework 4.5 Visual Studio 2012/2013/2015 ms SQL Server2005/2008/2012/2014 Express let's see how to install EF: Open VS2012 to create a project:

Then, select "project name", right-click, and select "manage Nuget packages". On the displayed page, enter "EntityFramework". The EntityFramework is automatically queried, click "Install" and follow the instructions below to install the SDK:

After the installation is complete, close the window...

 

Create a database:

In this series of courses, I will use the SchoolDB sample database, which contains data tables, stored procedures, and views. The database is designed as follows:

 

In this data chart, we can see the relationship between different tables: one-to-one: Student and StudentAddress, for example, a Student has 0 to 1 StudentAddress; one-to-many: Standard and Teacher tables have one-to-many relationships. For example, many Teacher tables are associated with a Standard table; multiple-to-many: student and Course tables have many-to-many relationships. StudentCourse tables are associated with each other through the intermediate table. For example, a Student can select many courses and a Course can have many students to choose from;

 

Now we have installed EF, and I believe you have learned it. In the next section, I will learn a simple Entity Data Model to create a database.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.