DataServiceContext.IgnoreResourceNotFoundException 属性
定义
获取或设置当数据服务返回 404 错误(找不到资源)时是否引发异常。Gets or sets whether an exception is raised when a 404 error (resource not found) is returned by the data service.
public:
property bool IgnoreResourceNotFoundException { bool get(); void set(bool value); };
public bool IgnoreResourceNotFoundException { get; set; }
member this.IgnoreResourceNotFoundException : bool with get, set
Public Property IgnoreResourceNotFoundException As Boolean
属性值
若设置为 true,则当数据服务返回“HTTP 404: 未找到资源”错误时,客户端库将返回一个空集,而不是引发 DataServiceQueryException。When set to true, the client library returns an empty set instead of raising a DataServiceQueryException when the data service returns an HTTP 404: Resource Not Found error.