开发者

Getting the full .NET type name in codesmith

开发者 https://www.devze.com 2023-01-16 03:30 出处:网络
Is there any way of getting the full .NET type name when writing a codesmith template? GetCSharpVariableType seems to return aliases onl开发者_JAVA百科y. Since I\'m using reflection, I need to be able

Is there any way of getting the full .NET type name when writing a codesmith template? GetCSharpVariableType seems to return aliases onl开发者_JAVA百科y. Since I'm using reflection, I need to be able to generate attributes with the type name and just "int" or "string" will not work.


Under the hood, that method is using the DbType-CSharp map. You would need to create a method in your template that uses the Sql-System map or just use column.SystemType.Name

Thanks -Blake Niemyjski

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号