/// <inheritdoc/> public override ICriteria GetTypeSelectionCriteria(Type type) { var property = MappingHelpers.GetTypeSelectionProperty(type); if (property == null) { throw new InvalidOperationException(string.Format(TypeCriteriaMissingExceptionMessage, type.Name)); } return(new ExistsCriteria(GetFieldName(type, property))); }
/// <inheritdoc/> public override ICriteria GetTypeSelectionCriteria(Type docType) { var property = MappingHelpers.GetTypeSelectionProperty(docType); if (property == null) { throw new InvalidOperationException(String.Format(TypeCriteriaMissingExceptionMessage, docType.Name)); } var prefix = GetDocumentMappingPrefix(docType); return(new ExistsCriteria(GetFieldName(prefix, property))); }