Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Dapper

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to install Dapper" related knowledge, Xiaobian through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope this "how to install Dapper" article can help you solve the problem.

A brief introduction to Dapper

Dapper is a lightweight ORM framework, which is constructed to solve the performance problems caused by high website traffic. It mainly implements the CQRS of the database by executing TSQL expressions.

If you encounter performance access problems in a project, it may be wise to choose Dapper as the ORM framework, but you can also use Entity Framework or NHibernate to handle big data access and relational mapping.

Second, why choose Dapper

1. Lightweight: there is only one file (SqlMapper.cs), and only 140K after compilation.

2. Fast: the speed of Dapper is close to that of IDataReader, and the data fetched from the list exceeds that of DataTable.

3. Support multiple databases: Dapper can work under all Ado.Net Providers, including sqlLite, Oracle, MySQL, SQL Server.

4. It can map various relationships such as one-to-one, one-to-many, many-to-many and so on.

5. High performance: get and generate objects quickly by reflecting the sequence queue of IDataReader through Emit, and the performance is good.

6. Support Framework2.0, 3.0,3.5,4.0,4.5.

Third, install Dapper1 and install using visual interface

Select the project or solution to install, and right-click the option to select manage NuGet package.

B. Search for "Dapper" in the search box and select install.

The installation process is shown in the following figure:

2. Install using the package Manager console

Enter the following command in the package Manager console:

Install-Package Dapper-Version 1.50.2

Note: when you use the command to install Dapper, you can choose which version to install, just add the-Version version number after it. If you do not enter the version number, the latest version is installed by default. I am using VS2013, and there is an error when installing the latest version 1.50.4. At this time, you can choose to install a lower version of Dapper,VS2017 to support the latest version of Dapper. You can also choose which version to install when using VS2017 to install in the first way.

That's all for "how to install Dapper". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report