ServiceStack ormlite connecting SQL Server database

Source: Internet
Author: User
Tags sql server connection string

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.