public static DbType ToDbType(Type type)
{
if (!typeToDbType.ContainsKey(type))
{
throw new InvalidOperationException(string.Format("Type {0} doesn't have a matching DbType configured", type.FullName));
}
return typeToDbType[type];
}
public ColumnInfo(MetaDataStore store, string name, Type dotNetType, PropertyInfo propertyInfo) : this(store, name, dotNetType, TypeConverter.ToDbType(dotNetType), propertyInfo) { }