ORM Dapper operation of SQL Server and MySQL database

Source: Internet
Author: User
Tags connectionstrings

1. Why Choose Dapper

1) Light weight.

2) fast speed. The speed of the dapper is close to the IDataReader, and the data for the list exceeds the DataTable.

3) support multiple databases. Dapper can work with all ADO providers, including SQLite, SqlCe, Firebird, Oracle, MySQL, PostgreSQL and SQL Server

4) can map one-to-one, one-to-many, many-to-many relationships.

5) High performance. By emit reflection IDataReader sequence queue, to quickly get and produce objects, performance is good.

6) Support framework2.0,3.0,3.5,4.0,4.5

7) Dapper syntax is very simple. And no need to compromise the design of the database

2. Using tutorials

1) Add a connection string to the configuration file, Web. config

  <connectionStrings>    <add name= "sqlconnectionstring" connectionstring= "server=127.0.0.1;database= MyDataBase; user=sa;password=123456; Connect timeout=1000000 "/>    <add name=" mysqlconnectionstring "connectionstring=" Database=hyd;data Source= 127.0.0.1; User Id=root; Password=root; charset=utf8;port=3306 "/>  </connectionStrings>

2)

ORM Dapper operation of SQL Server and MySQL database

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.