❔ facing error while pushing add migration command

MHBRHKmer_nam hai bulla rakhta hu kula12/20/2022
connection string is created,dbcontext is inherited and added as service
Image
Pphaseshift12/20/2022
Can your context be created normally when the app is running?

You don't want to show your app-context code?
MHBRHKmer_nam hai bulla rakhta hu kula12/20/2022
no no not an issue
MHBRHKmer_nam hai bulla rakhta hu kula12/20/2022
my applicationDbcontext
Image
FFusedQyou12/20/2022
How and when do you add the dbContext?
MHBRHKmer_nam hai bulla rakhta hu kula12/20/2022
here in program.cs
Image
FFusedQyou12/20/2022
Can you move the optionsbuilder into your ApplicationDbContext using the void OnConfiguring(DbContextOptionsBuilder optionsBuilder) method?
FFusedQyou12/20/2022
You can inject your configuration. It would look something like this. In your case you will have an IConfiguration injected.
ImageImage
FFusedQyou12/20/2022
Probably doesn't matter, but either way.
AAccord12/21/2022
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.