Hi, as i understand every time that an action is called a new instance of the corresponding controller is creating, but in asp.net core we use DI so the properties like EF db contextes won't recreate and also we usually make our action async, so here I'm
wondering why every time the new controller class in creating, doesn't it have overhead and also using extra memory??
I mean why not use controllers as singleton classes, is there any specific reason behind all this, or its the way it is and just framework creators liked it this way??
↧
controllers
↧