RegisterTypeMapping() public static méthode

Registers the type mapping between a Type and DbType.
public static RegisterTypeMapping ( Type type, DbType dbType ) : void
type System.Type The Type to be mapped.
dbType DbType The DbType to be mapped to.
Résultat void
 /// <summary>
 /// Initialises a new instance of the <see cref="TimeSpanTypeConverter"/> class.
 /// </summary>
 public TimeSpanTypeConverter()
 {
     TypeConverter.RegisterTypeMapping(this.timeSpanType, DbType.Int64);
     TypeConverter.RegisterTypeMapping(this.timeSpanTypeNullable, DbType.Int64);
 }
Exemple #2
0
 /// <summary>
 /// Initialises a new instance of the <see cref="XDocumentTypeConverter"/> class.
 /// </summary>
 public XDocumentTypeConverter()
 {
     TypeConverter.RegisterTypeMapping(this.xdocumentType, DbType.String);
 }
 /// <summary>
 /// Initialises a new instance of the <see cref="UriTypeConverter"/> class.
 /// </summary>
 public UriTypeConverter()
 {
     TypeConverter.RegisterTypeMapping(this.uriType, DbType.String);
 }