I'm not sure why someone hasn't written this, but here is goes:
(no warranties, expressed or implied)
/// <summary>
/// Get the native type based on the database type
/// </summary>
/// <param name="dbType">The database type to convert</param>
/// <returns>The equivalent managed type, otherwise the DBNull
type</returns>
static Type ConvertType( DbType dbType )
{
Type toReturn = typeof( DBNull ) ;
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.