❔ Registering a User with Identity and EfCore calls the OnConfiguring Method of my AppDbContext?
Is this supposed to be happening? It seems incredibly inefficient if so. I have attached an animated gif to show what I mean.
https://media.discordapp.net/attachments/1043638776200695870/1043638776410415144/Animation.gif
4 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I see. I renamed the tables and properties using snakecase in the OnModelCreating method, but that means whenever a user needs to request something from my database, then it will go through the OnModelCreating method which will slow down all the requests by a large amount. Would it be better to add the dbcontext as a singleton so this doesnt happen?
ah nvm, i've learned the onmodelcreating is called the first time the context is created.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.