Upgraded to Dotnet Core 3.1 from 2.2, EF core kept complaining EF1001: internal ef core api usage by putting an Exclamation Mark in my project.
But no error / warning shown during compilation. I do not know which line of code is causing the trouble.
May I know how can I find out which API / Method that I am not suppose to use?
Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology. EF Core can serve as an object-relational mapper (O/RM), which: Enables . NET developers to work with a database using .
There's currently no support for using the EF designer directly on . NET Core or . NET Standard projects.
Keep using EF6 if the data access code is stable and not likely to evolve or need new features. Port to EF Core if the data access code is evolving or if the app needs new features only available in EF Core. Porting to EF Core is also often done for performance.
Right-click the Controllers folder. Select Add > New Scaffolded Item. Select API Controller with actions, using Entity Framework, and then select Add.
The warnings from these analyzers can be really confusing. If I understand this correctly, the issue is not what it seems.
The message with the gray warning icon inside the analyzer is normal and indicates what the analyzer is checking. See the Analyzers in Solution Explorer documentation for an explanation.
If you are experiencing yellow icons on the parent node ("Analyzers") try to unload/reload the project, or maybe open Visual Studio in admin mode. See the answer to "Analyzers warnings in ASP.NET Core 2.2 project in VS2019 " for details.
If you don't see a warning in the error list then I advise you to ignore that.
The GitHub issue "Confusing analyzer warnings in solution explorer with no way to see any details" provides additional information on this.
Are you using a database provider (i.e. packages for SQLServer, Postgres, etc)?
It sounds like you are saying there is some warning being given with your dependencies. I know Microsoft announced some breaking changes, mainly for database providers, with EF Core with the 3.0+ updates. Could be as simple as updating the other packages in your project.
Just guessing, I could very well be wrong.
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