Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of errors in operating mysql after Asp.netCore1.1 upgrade

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Today, I will talk to you about how to solve the problem of errors in the operation of mysql after Asp.netCore1.1 upgrade, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

The version of core is upgraded from 1.0 to 1.1. it operates mysql database and encounters MissingMethodException problems when querying data. there is no problem with update and insert operation.

If you also encounter this problem, please follow the steps below to upgrade.

Operation steps and contents

If your project has already referenced the following parts, please upgrade the content in turn:

PM > Update-Package Microsoft.EntityFrameworkCorePM > Update-Package Microsoft.EntityFrameworkCore.SqlServerPM > Update-Package Microsoft.EntityFrameworkCore.RelationalPM > Update-Package Microsoft.EntityFrameworkCore.Tools-Pre

If you have not already installed it, please use the installation statement

PM > Install-Package Microsoft.EntityFrameworkCorePM > Install-Package Microsoft.EntityFrameworkCore.SqlServerPM > Install-Package Microsoft.EntityFrameworkCore.RelationalPM > Install-Package Microsoft.EntityFrameworkCore.Tools-Pre

After the installation is complete, if the mysql extension you reference is the following version (or less than this version). ) will still fail to complete the query operation

"MySql.Data.EntityFrameworkCore": "7.0.6-IR31"

Remove the reference and install SapientGuardian.EntityFrameworkCore.MySql using NUGET

PM > Install-Package SapientGuardian.EntityFrameworkCore.MySql

If the IDE you are using is vs Code, add the following dependencies in project.json

"SapientGuardian.EntityFrameworkCore.MySql": "7.1.14"

Then execute dotnet restore in CLI

Then you need to add references to startup.cs.

Using MySQL.Data.Entity.Extensions

Well, the rest of the code hasn't changed. Try again and you will find that your system is working properly.

After reading the above, do you have any further understanding of how to solve the problem of errors in operating mysql after Asp.netCore1.1 upgrade? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report