When using OrmLite (SqlServer) for db access, my servicestack now has about 200 lines of codes using
Of course the app in production is deployed daily, but the tables do not change daily, almost never.
I see a long delay in starting up the service because of these lines of codes.
Do they have to be their all the time? Do they initialize the Table/ORM in some kind.
Can I just leave them out, and only add one when before a new version deploy there was a table added?
You’d typically want to “touch” a Table API on Startup so it builds the Metadata cache for the model on the single thread on Startup. It doesn’t matter which Table API you use as they’ll all use the same APIs to query (& cache) the table metadata, which you can also do explicitly with: