❔ facing error while pushing add migration command
connection string is created,dbcontext is inherited and added as service
9 Replies
Can your context be created normally when the app is running?
You don't want to show your app-context code?
no no not an issue
my applicationDbcontext
How and when do you add the dbContext?
here in program.cs
Can you move the optionsbuilder into your ApplicationDbContext using the
void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
method?You can inject your configuration. It would look something like this. In your case you will have an IConfiguration injected.
Probably doesn't matter, but either way.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.