GenerateCrudServices

Attempting to update my code to v8.9 and I’ve hit a potential issue (I’ve probably missed something)

I’m using the new AddOrmLite() configuration style, however I’m unable to use the dbFactory I would have usually returned using the old method.

GenerateCrudServices = new GenerateCrudServices
{
     DbFactory = dbFactory,
     AutoRegister = false,
}

When I remove the DbFactory property, I get the following error on runtime:

System.NotSupportedException: GenerateCrudServices.DbFactory is not configured

Thanks for your time.

You still need to configure it with a dbFactory which you can get from the builder returned in the fluent configuration, e.g:

var ormLite = services.AddOrmLite(options => ... );
var dbFactory = ormLite.DbFactory;

Brilliant, thanks for the fast reply.