MVC applications use the entity Framework

Source: Internet
Author: User

Create an empty MVC application, in order to use the Entity Framework's class library, the discovery is not normal reference. For example, Insus.net has explicitly cited System.Data.Entity (highlight code), but the class is not referenced correctly when inheriting dbcontext.




Go to Microsoft MSDN View Material: Http://msdn.microsoft.com/en-us/library/system.data.entity (v=vs.103). aspx




The MVC application created by Insus.net is also the. NET Framework 4.5. Create the first MVC application http://www.cnblogs.com/insus/p/3358560.html. But Insus.net has tried to create an Internet MVC application that can be used to this dbcontext class. In a careful comparison, an application that originally created empty (null) MVC was not referenced to the Entity Framework class library (left), and in the MVC application you created the Internet, it was referencing the Entity Framework Class library (right).



The difference is that we can reference it in an empty MVC application.

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.