I want to be doing this correct, so if possible very briefly outline how to add a SQL database to a Core 2.1 ServiceStack template project.
I have added Servicestack.ormlite.Core & Servicestack.ormlite.Sqlserver.Core to my main web app project and the ServiceModel project. Hence my confusion.
I am assuming that the table mappings go in the ServiceModel; plz verify this also. thanks.
I’ve answered this in your other question
Don’t reference .Core packages in a .NET Core App, reference the normal ServiceStack packages only, e.g. Servicestack.OrmLite.SqlServer.
Your ServiceModel project should not reference any other dependencies except ServiceStack.Interfaces. It should only contain your DTOs and no other concrete dependencies, for background info see this article on purpose of DTOs.
Any Server implemention logic should remain in ServiceInterface, also only your host project needs the concrete RDBMS ServiceStack.OrmLite.SqlServer dependency, your ServiceInterface project only needs ServiceStack.OrmLite. Have a look at code bases of existing .NET Core Apps like TechStacks for examples.