public async Task<ActionResult> Login(Loginviewmodel model,string returnUrl) { }
什么时候应该在MVC操作上这样做?当它包含访问数据库?
如果我在动作中调用存储库,我还应该使用Task来使其异步吗?
基本上,几乎从不以异步方式调用数据库。
For database applications using async operations to reduce the number of blocked threads on the web server is almost always a complete waste of time.
人们告诉你如果可能,总是使用异步IO,不要被损害。异步现在就是愤怒。很多不合理的建议正在蔓延。