Hi,shenbagapandiyanp
Does this post also related to ef core? And what is your project type, could you please shared some related code?
Transient works best for lightweight, stateless services. If you don't use any other injected services which are also using your DBContext there's
no difference between scoped and transient.
Following links may help you, you can view more details about transient and scoped:
does-dbcontext-registered-as-scoped-or-transient-affect-in-closing-database
addtransient-addscoped-and-addsingleton-services-differences
Best Regards,
Jerry Cai
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.