I'm new to ASP.NET and just managed to configure my machine to be able to Update my EFModel from a distant MySql database.
I had to install MySql Connector 6.9.8 and MySql for Visual Studio 1.2.7. Everything was working well and I was able to build my API without problems. So after installing MySql Connector 6.9.8 I followed these steps to get rid of the EntityFramework error.
Just after that I updated my model from my database and wanted to publish my project to check whether the newly created fields of my table were well linked, I got an error:
“The type or namespace 'UphairDbEntities' could not be found”
Since I didn't touch a thing in my API or WebApp project before, I checked on a backup of this project and I figured out I was missing the DbModel.context.cs in my EFModel under the file DbModel.Context.tt in my actual version. Why is it missing and how can I generate this file please ?
For the record, I'm using Entity Framework 6.2.0 and MySql.Data/MySql.Data.Entity NuGet packages 6.9.9.
Thanks in advance for you support :)
Like stated here, I just had to delete all the files under the edmx (DbModel.Context.tt, DbModel.Designer.cs and DbModel.tt) and to update model from database with Entity Data Model Designer.
Now I understand how Entity works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With