【发布时间】:2023-04-02 06:51:01
【问题描述】:
我有一个从 SQL 过程加载 ObjectResult 的局部视图。这是使用内置的 EF 方法。
public virtual ObjectResult<Something_Result> getSomething()
{
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Something_Result>("getSomething");
}
所以一个常见的问题是数据库超时,我想展示一下。但我似乎无法在 Ajax.Load() functon 的异常对象中找到它。
在 responseText 我只得到 "{"message":"An error occurred while executing the command definition. See the inner exception for details."}" 并且状态为:500
那么它也是获取内部异常的简单方法吗? 这是 Ajax.load() 函数http://i.imgur.com/ZIrTrMU.jpg 抛出的异常 这是来自 EF 的内部异常:http://i.imgur.com/LgOhOlB.png
【问题讨论】:
标签: ajax asp.net-mvc entity-framework exception