SqlServerTimeConverter + db.CreateTable

I have my ormlite config as follows

            JsConfig.DateHandler = DateHandler.ISO8601;
        JsConfig.AlwaysUseUtc = true;

        OrmLiteConfig.CommandTimeout = 20;

        SqlServerDialect.Provider.RegisterConverter<TimeSpan>(new SqlServerTimeConverter { Precision = 7});
        

        var dates = OrmLiteConfig.DialectProvider.GetDateTimeConverter();
        dates.DateStyle = DateTimeKind.Utc;

        var factory = new OrmLiteConnectionFactory(connection, SqlServerDialect.Provider);

When I’m using db.CreateTableIfNotExists, I was expecting the timespan properties to be to be of the column type time(7) but they are bigInt. Is there anything I’m doing wrong?

What is your OrmLiteConfig.DialectProvider? I run your sample with

        OrmLiteConfig.DialectProvider = new SqlServerOrmLiteDialectProvider();

And with this datatype

    public class Hello
    {
        public string Name { get; set; }

        public TimeSpan Time { get; set; }
    }

And it created time(7) column for Time property. Can you provide standalone sample which shows the issue?

Thanks, I’ll give that a try.