This is a question about how ASP.NET MVC is working. Now I am trying to understand how the controller pass data from database. And I cannot see where "context" comes from to the args[0] of the constructor in a scaffoled controller. For example, when you scaffolds a controller from a model called "item", you get ItemsController. The constructor of StaffsConroller goe like;
public ItemsController(DbContext context) { _context = context } The variable "_context" is declared in ItemsController. But where is "context" instanced?