Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

controllers

$
0
0

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??


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>