Answer the question
In order to leave comments, you need to log in
How do Actions work in Controllers when they are accessed by multiple users at once?
So! There is, say, a Home controller and it contains an action named DoSomeThingForUser
class HomeController : Controller
{
public ActionResult DoSomeThingForUser(SomeModel model)
{
//Что-то делаю с моделью, мб обращаюсь к базе и т.д и возвращаю юзеру
return(model)
}
}
Answer the question
In order to leave comments, you need to log in
There will be no locks in the action (unless you put them there yourself), and they don't need to be there. The default controller factory creates a controller instance per request, so 99 users won't wait for one. If you need details - search Google for "asp.net mvc controller instancing", a lot of articles fall out from which you can start to understand.
Nipheris :
Примерно так kernel.Bind<IDatabaseFactory>().To<DatabaseFactory>().InSingletonScope();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question