public RecordRestriction GetNonPrimaryFieldRecordRestriction(
T record,
IEnumerable<string>? excludedFields = null
)
Public Function GetNonPrimaryFieldRecordRestriction (
record As T,
Optional excludedFields As IEnumerable(Of String) = Nothing
) As RecordRestriction
public:
RecordRestriction^ GetNonPrimaryFieldRecordRestriction(
T record,
IEnumerable<String^>^ excludedFields = nullptr
)
function GetNonPrimaryFieldRecordRestriction(record, excludedFields);
This will look up a newly added record when the primary key values are not yet defined searching all field values. If all fields do not represent a unique record, queries based on this restriction will return multiple records. Note that if the modeled table has fields that are known be unique, searching based on those fields is preferred.
Any field modeled with ExcludedFieldAttribute will automatically be excluded from the restriction. The excludedFields parameter can be used to specify additional fields to exclude from the restriction.