EF architecture ~migration Migration of MySQL databases

Source: Internet
Author: User
Tags mssql

Back to Catalog

EF is a really powerful ORM tool that works well both in entity modeling and in entity relationships, and the recent code first has made it easier for me to use database changes, not to mention SQL Server support, because MSSQL itself is Microsoft's, We mainly look at its support for MySQL data changes!

Changes to the data context: Add-migration init

MySQL error has occurred:

This is because your data context does not add the MySQL migration feature, because the default is SQL Server, hehe

/// <summary>    /// LINDDB The context object    for this database /// </summary>    [Dbconfigurationtype (typeof(MySql.Data.Entity.MySqlEFConfiguration))]      Public Partial class Erpcontext:dbcontext {}

After adding the attributes of the database type we added to the context, our changes are just like the previous MSSQL!

Thank you for reading!

Knowledge lies in Accumulation!

Back to Catalog

EF architecture ~migration Migration of MySQL databases

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.