1. SmartSql.TypeHandler

1.1. Nuget Installation

Install-Package SmartSql.TypeHandler -Version 3.0.1

SmartSql.TypeHandler includes two types of type handlers: JsonTypeHandler & XmlTypeHandler. When the field type needs to be serialized into a Json or Xml scene, you can use the following configuration to serialize the Data property into a Json string and store it in the DB:

1.1.1. SmartSqlMapConfig child element

   <TypeHandlers>
     <TypeHandler Name="Json" Type="SmartSql.TypeHandler.JsonTypeHandler,SmartSql.TypeHandler"/>
     <TypeHandler Name="Xml" Type="SmartSql.TypeHandler.XmlTypeHandler,SmartSql.TypeHandler"/>
   </TypeHandlers>

1.1.2. SmartSqlMap Child Elements

   <ResultMaps>
     <ResultMap Id="ExtendedDataResult">
       <Result Property="Data" Column="Data" TypeHandler="Json"/>
     </ResultMap>
   </ResultMaps>
   <ParameterMaps>
     <ParameterMap Id="ExtendedDataParameter">
       <Parameter Property="Data" TypeHandler="Json"/>
     </ParameterMap>
   </ParameterMaps>