mina shaker

mina shaker

  • 1.6k
  • 61
  • 3.2k

what is the role of the IMiddlewarFactory in asp.net core ?

Sep 16 2024 6:08 PM

hi  

is the role of the IMiddlewarFactory is to add the middlewear created as a scoped service in the container or it is resposible for injecting services as scoped to the middlewear it self, do i have to register the factorybasedMiddlewears as a scoped befor using it 

when i read more about this is found that IMiddlewearFactory creates an instance of the middlewear and its depeindances which should be scoped  services  for each request that is not related to other requests ,am i right


Answers (3)