Why does the EF 6 tutorial use asynchronous calls?

后端 未结 3 911
忘掉有多难
忘掉有多难 2020-11-22 11:35

The latest EF tutorial that goes through how to use EF 6 with MVC 5 seems to lean towards using asych calls to the database like:

Department department = awa         


        
3条回答
  •  有刺的猬
    2020-11-22 12:14

    On ASP.NET, you should use asynchronous APIs for anything I/O-related, including database access and web service calls.

    Using async allows ASP.NET to make maximum use of the thread pool, resulting in non-trivial scalability benefits.

提交回复
热议问题