Performance Comparison Between DbHelperSQL and Dapper Data Access

Source: Internet
Author: User

In order to save time, CRUD operations on the database were directly encapsulated using the dynamic software DbHelperSQL class library, which is very convenient to use and can be done directly with two lines of code!

For example, string strSelect = "select userName from tb"; DbHelperSQL. Query (strSelect.

I recently saw imfunny's in-depth research on Dapper. I admire this kind of research spirit and thank him for his patience in answering the question. I am going to change the project to the data access class library such as microORM, so I made a simple performance.

Ability to test, mainly compare the two data types for the length of time spent on the insertion and reading of 500 records. Due to the first contact, experts are invited to make a decision in areas not comprehensive.

It can be seen that for batch insert operations, the performance of Dapper is far better than that of dynamic and soft DbHelperSQL (completed through transactions), but in the query operation, Dapper takes a long time and finds that the program is executed.

Several times, the time difference is greater. The specific reason is being queried. If you are familiar with Dapper talents, please discuss IT actively. Finally, we will attach the source code to wish you a happy holiday :). Source code download

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.