ObjectQuery<T>.SelectValue<TResultType> メソッド
[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]
クエリの結果を、投影で指定されたプロパティのみに制限します。
名前空間: System.Data.Entity.Core.Objects
アセンブリ: EntityFramework (EntityFramework.dll 内)
構文
'宣言
Public Function SelectValue(Of TResultType) ( _
projection As String, _
ParamArray parameters As ObjectParameter() _
) As ObjectQuery(Of TResultType)
'使用
Dim instance As ObjectQuery
Dim projection As String
Dim parameters As ObjectParameter()
Dim returnValue As ObjectQuery(Of TResultType)
returnValue = instance.SelectValue(projection, _
parameters)
public ObjectQuery<TResultType> SelectValue<TResultType>(
string projection,
params ObjectParameter[] parameters
)
public:
generic<typename TResultType>
ObjectQuery<TResultType>^ SelectValue(
String^ projection,
... array<ObjectParameter^>^ parameters
)
member SelectValue :
projection:string *
parameters:ObjectParameter[] -> ObjectQuery<'TResultType>
JScript does not support generic types and methods.
型パラメーター
- TResultType
SelectValue<TResultType>(String, ObjectParameter[]) メソッドによって返された ObjectQuery<T> の型。
パラメーター
- projection
型 : System.String
投影の一覧。
- parameters
型 : System.Data.Entity.Core.Objects.ObjectParameter[]
解析時にスコープに含める必要があるオプションのクエリ パラメーターのセット。
戻り値
型 : System.Data.Entity.Core.Objects.ObjectQuery<TResultType>
特定の投影と互換性がある型の新しい ObjectQuery<T> インスタンス。返される ObjectQuery<T> は、SELECT VALUE が適用された元のインスタンスに相当します。
例外
例外 | 状態 |
---|---|
ArgumentNullException | projection が null であるか、または parameters が null です。 |
ArgumentException | projection が空の文字列です。 |