Language

CollectionModel.GetDataOrKeyProperty<TRecord> Method

Definition

Gets the data or key property selected by the provided expression.

public:
generic <typename TRecord>
 Microsoft::Extensions::VectorData::ProviderServices::PropertyModel ^ GetDataOrKeyProperty(System::Linq::Expressions::Expression<Func<TRecord, System::Object ^> ^> ^ expression);
public Microsoft.Extensions.VectorData.ProviderServices.PropertyModel GetDataOrKeyProperty<TRecord>(System.Linq.Expressions.Expression<Func<TRecord,object?>> expression);
member this.GetDataOrKeyProperty : System.Linq.Expressions.Expression<Func<'Record, obj>> -> Microsoft.Extensions.VectorData.ProviderServices.PropertyModel
Public Function GetDataOrKeyProperty(Of TRecord) (expression As Expression(Of Func(Of TRecord, Object))) As PropertyModel

Type Parameters

TRecord

The type of the record.

Parameters

expression
Expression<Func<TRecord,Object>>

The property selector.

Returns

The matching PropertyModel.

Exceptions

The provided property name is not a valid data or key property name.

Applies to