LINQ-to-SQL查询时序输出

时间:2009-07-08 20:30:26

标签: linq-to-sql

我在LINQ中运行此查询:

var unalloc = db.slot_sp_getUnallocatedJobs("Repair", 
                  RadComboBox1.SelectedValue, 20);

它在我第一次打开页面时运行,但是当我回到它并尝试使用不同的值运行相同的查询时,“Con”正在通过,linq to sql designer.cs告诉我,我有超时错误。

有什么想法吗?

编辑:这就是设计师的目标:

[Function(Name="dbo.slot_sp_getUnallocatedJobs")]
Public ISingleResult<slot_sp_getUnallocatedJobsResult> slot_sp_getUnallocatedJobs([Parameter(Name="JobType", DbType="VarChar(20)")] string jobType, [Parameter(Name="Contract", DbType="VarChar(10)")] string contract, [Parameter(Name="Num", DbType="Int")] System.Nullable<int> num)
        {
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), jobType, contract, num);
            return ((ISingleResult<slot_sp_getUnallocatedJobsResult>)(result.ReturnValue));
        }
    }

这是错误:

SQLException was unhandled by user code
Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

0 个答案:

没有答案