Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public override Data.AdoTypeConverter Initialize(Data.IDataColumn user, Type clr, Data.IAdoTypeConverterRegistry registry, bool secondaryTable)
- {
- //first we need to ensure that the clr type can be handled by this converter
- if (clr == typeof(int) && user.ResolvedSqlType == "varchar")
- {
- //then we need to set a flag to determine if the type is nullable
- nullable = typeof(int?) == clr;
- //finally return base.Initialize, which ultimatly returns "this"
- return base.Initialize(user, clr, registry, secondaryTable);
- }
- //if the converter can not work with the specified clr type we return null
- return null;
- }
Add Comment
Please, Sign In to add comment