Win32Exception:等待操作超时 - LINQ TO SQL

Win32Exception: The wait operation timed out - LINQ TO SQL

我有多个表的 linq to sql 内连接。出于某种奇怪的原因,在生成查询时,我的应用程序在没有任何消息的情况下中断。我首先在代码中设计一个 mvc 应用程序。

最近我也遇到了一个不熟悉的错误:

exception details: system.componentmodel.win32exception: the wait operation timed out

有人可以帮助我吗

解决方法是使用 lambda 表达式并保存到 ViewBag,例如

ViewBag.PassportNumber =(来自 db.Client 中的 x,其中 x.Id == Id select x.passportNumber).FirstOrDefault();