Anybody got a C# function that maps the SQL datatype of a column to its CLR equivalent?

后端 未结 12 1713
逝去的感伤
逝去的感伤 2020-12-12 16:18

I\'m sitting down to write a massive switch() statement to turn SQL datatypes into CLR datatypes in order to generate classes from MSSQL stored procedures. I\'m using this c

12条回答
  •  孤城傲影
    2020-12-12 16:52

    You can try Wizardby. However, it maps from so-called "native" data types to DbType, which are then trivial to convert to CLR types. If this fits, you'll need an appropriate IDbTypeMapper - either SqlServer2000TypeMapper or SqlServer2005TypeMapper.

提交回复
热议问题