Example #1
0
    public static SqlColumnDeclaration Convert(PropertyInfoWithAttributes propertyInfoWithAttributes)
    {
        var nullableSqlType = ClrTypeToSqlTypeConverter.Convert(propertyInfoWithAttributes.PropertyInfo.PropertyType);
        var name            = propertyInfoWithAttributes.PropertyInfo.Name;

        AddNecessaryAnnotations(nullableSqlType, propertyInfoWithAttributes);
        return(new SqlColumnDeclaration(name, nullableSqlType));
    }
Example #2
0
    public void TestTranslate(Type type, bool canTranslate)
    {
        var canTranslateResult = ClrTypeToSqlTypeConverter.CanTranslateToSqlType(type);

        canTranslateResult.Should().Be(canTranslate);
        if (canTranslate)
        {
            Console.WriteLine(ClrTypeToSqlTypeConverter.Convert(type));
        }
    }