Migrations Issues #1115
Closed
fernandohermida
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I'm currently facing several challenges with database migrations in my project and would greatly appreciate some guidance.
Here's what I'm trying to accomplish:
While the process may seem straightforward, I've encountered difficulties despite trying various approaches.
Could someone kindly provide insights or suggestions on how to tackle this issue effectively?
some error i found in the console using CLI commands
Unable to create a 'DbContext' of type ''. The exception 'No database provider has been configured for this DbContext. A provider can be configured by overriding the 'DbContext.OnConfiguring' method or by using 'AddDbContext' on the application service provider. If 'AddDbContext' is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
More erros
Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions
1[Project.Infrastructure.Data.ApplicationDbContext]' while attempting to activate 'Project.Infrastructure.Data.ApplicationDbContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728`and if i use VS comands im getting this
Your startup project 'Project.Web' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.
Beta Was this translation helpful? Give feedback.
All reactions