Click or drag to resize
DataMapper Class

Provides mapping of data types and their values from .NET types to Azure Search types.

The implementation can map Int32, Int64, Boolean, Double, DateTime, String and IEnumerableT of String types directly to their Azure counterparts. Types Guid and Decimal are mapped as String and Double respectively.

Inheritance Hierarchy
SystemObject
  CMS.Search.AzureDataMapper

Namespace: CMS.Search.Azure
Assembly: CMS.Search.Azure (in CMS.Search.Azure.dll) Version: 12.0.0
Syntax
C#
public class DataMapper

The DataMapper type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberInstance
Gets the DataMapper instance.
Top
Methods
  NameDescription
Public methodConvertValue
Coverts value of type supported by this mapper to result of type suitable for Azure Search.
Public methodMapType
Gets Azure Search DataType suitable for given type.
Public methodRegisterMapping
Registers a new mapping of type to Azure Search DataType along with a function for conversion of source values to target values directly assignable to Azure Search API.
Top
Remarks
Certain mappings can cause loss of precision. Azure Search does not support sub-millisecond precision of date time. The Decimal type is mapped to Double, which can lead to round-off errors.
See Also