I need to generate some DDL based on the names and data types of a collection of DataColumn instances in C#.
Does anyone know of a class/method that provides the SQLServer datatype for a given C# data type, such as string, DateTime, bool, etc... I know that there is a mapping on this site that I could put into a dictionary and use, but I'm hoping that there is a class somewhere that provides this lookup.
I do know about that mapping table - I was hoping there was a class somewhere that I could call that would provide the lookup - I figured other people had probably run into this before.