EF architecture ~ Migration of mysql database by migration, migrationmysql

Source: Internet
Author: User

EF architecture ~ Migration of mysql database by migration, migrationmysql

Back to directory

Ef is indeed a powerful orm tool. It has played an outstanding role in both Object Modeling and Object Relations. The recent use of code first for database changes makes it even better, let's not talk about the support for sqlserver, because mssql itself is Microsoft's. Let's take a look at its support for mysql DATA changes!

Data Context Change: add-migration init

Mysql error:

This is because your data context does not add the mysql Migration Feature, because the default is sqlserver

/// <Summary> /// context object of the database named "LindDb" /// </summary> [DbConfigurationType (typeof (MySql. data. entity. mySqlEFConfiguration)] public partial class ERPContext: DbContext {}

After adding the Database Type feature to the context, our changes will be the same as the previous mssql!

Thank you for reading this article!

Knowledge is accumulation!

Back to directory

 

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.