Technology Exchange Group: 665060698
Servicestack is a. NET Service class library that contains very rich data processing and is very efficient to execute.
But ServiceStack is not only used to write services, but also to reference the DLLs in the database connection operation, ServiceStack
Ormlite supports a number of data types, including SQL Server, Mysql, Postgresql, SQLite, and so on, to share a
Simple ServiceStack ormlite Connect to the SQL Server database and get the data.
var _sqlserverfla = new Ormliteconnectionfactory ("SQL Server connection string", Sqlserverdialect.provider); Open database connection using (var db = _sqlserverfla.open ()) {//model field to be returned with the SQL statement should correspond to var _aqidaylst = db. select< "Model of Object" > ("SQL statement"); The execution db of the DB. Insert<>, can perform operations such as inserting data.}
Below is the DLL file that needs to be referenced
Public Number:
ServiceStack ormlite connecting SQL Server database