Official PetaPoco and petapoco websites

Source: Internet
Author: User

Official PetaPoco and petapoco websites

We all know that ORM is called Object Relationship er, that is, we can use object to map our db.

In addition, there are many orm frameworks on the market, including heavyweight Entity frameworks, lightweight Dapper and PetaPoco.

 

If you like native SQL statements, simple ORM, and high performance, the lightweight ORM framework is your best choice.

Speaking of the lightweight ORM framework Dapper ?), However, I chose PetaPoco because:

  • Provides easier-to-use APIs
    • Dapper only provides a series of Query reloads for ing SQL statements into entities.
    • In addition, PetaPoco also provides a series of Helper methods such as Insert/Update/Delete/Save/paging, such:
    • You can also specify the table name and primary key.
    • For more detailed examples, see the DEMO on the official website: http://www.toptensoftware.com/petapoco/
  • Performance comparable to Dapper (I tested faster than Dapper)
    • According to Dapper official website (https://github.com/StackExchange/dapper-dot-net) Test Results PetaPoco performance ranking 4th, Dapper 2nd
    • 1st is hard-coded, 3rd of ServiceStack. OrmLite is charged, and there are too many dependencies. Dapper and PetaPoco are single. cs files with no Dependencies
    • My own test results show that PetaPoco is faster than Dapper. You can test it on your own.

 

As of February 5, PetaPoco does not support. NET Core, but it is not difficult to port source code to. NET Core. below is the transplanted code. You can download it by yourself.

: Click Download

 

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.