ASP. NET Entity Framework with MySql Server releases environment Configuration

Source: Internet
Author: User
Tags mysql for visual studio

First,. net should come with Entity Framework, so the server will be OK if there is a corresponding version of. net Framework!

In the development environment, we usually directly use edmx to manage the interaction between applications and databases. All Database-related operations are handled by EF. Developers will move the focus to the application layer, focus more on program business development. We know that by default, VS only provides drivers for some databases, such as SQL Server, Excel, Access, and Oracle. MySql does not have a corresponding driver. Before developing ASP. NET applications based on MySql Databases in Visual Studio, the following tools or assembly are required.

1.MySql Connector-Provides the MySql database driver.

Installation packages can be found on the MySql official website http://dev.mysql.com/downloads/connector/net/6.0.html

Here is an article describing some basic usage http://www.cnblogs.com/wintersun/archive/2010/12/12/1903861.html

With the driver, Entity Framework can connect to the MySql database using the corresponding Provider, and then automatically generate the corresponding Entity class and database operation method.

2.MySql for Visual Studio-Optional. This tool provides extensions to Visual Studio. Do you still remember how to connect to the SQL Server database in VS and directly modify the tables, stored procedures, and other objects in the database? With the MySql for Visual Studio tool, you can connect to the MySql database in VS and view the data, tables, and other objects at any time, and modify them. Official site offers download http://www.mysql.com/why-mysql/windows/visualstudio/

3.MySql Front-Optional. A client tool for MySql database development that supports visual operation interfaces, making various operations on the MySql database easy. Here is the download address http://www.mysqlfront.de /. Of course, you can use any client tool you are familiar.

Okay! You now have all the necessary items in the development environment. on the local machine, you can write code just like developing common database applications. Because of the support of EF, database operations are very simple! For some basic usage and introduction to Entity Framework, you can view the http://www.entityframeworktutorial.net/EntityFramework-Architecture.aspx here

However, on the server side, the situation is slightly different! Sometimes it is impossible for us to directly install MySql ctor on the server. the program published on the server usually reports unable to find the requested due to the lack of the corresponding MySql database driver. net Framework Data Provider error. How can this problem be solved? In fact, the installation of MySql Connector is just a few registered on the local machine.. net Assembly. We can directly reference the Assembly used in it to the project and set it to Copy Local = true. The following three sets are required:

Make sure that the. net Framework installed on the server contains the Entify Framework version you are using, and then the program should run properly.

 

Related Resources:

Using MySQL with Entity Framework and ASP. net mvc-Part I

Using MySQL with Entity Framework

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.