ObjectQuery<T>.SelectValue<TResultType> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將查詢結果限制為只有投影中指定的屬性。
public System.Data.Entity.Core.Objects.ObjectQuery<TResultType> SelectValue<TResultType> (string projection, params System.Data.Entity.Core.Objects.ObjectParameter[] parameters);
member this.SelectValue : string * System.Data.Entity.Core.Objects.ObjectParameter[] -> System.Data.Entity.Core.Objects.ObjectQuery<'ResultType>
Public Function SelectValue(Of TResultType) (projection As String, ParamArray parameters As ObjectParameter()) As ObjectQuery(Of TResultType)
類型參數
- TResultType
ObjectQuery<T> 方法所傳回之 SelectValue<TResultType>(String, ObjectParameter[]) 的型別。
參數
- projection
- String
投影清單。
- parameters
- ObjectParameter[]
一組選擇性查詢參數,而且這些參數在剖析時應該位於範圍中。
傳回
ObjectQuery<TResultType>
型別與特定投影相容的新 ObjectQuery<T> 執行個體。 傳回的 ObjectQuery<T> 就相當於套用了 SELECT VALUE 的原始執行個體。
例外狀況
投影為 Null,或參數為 null。
projection 是空字串。