Petapoco is a lightweight object-relational mapper for. NET Applications

Source: Internet
Author: User

Petapoco is a lightweight object-relational mapper (ORM, Object Relational Mapper) for. NET Applications. Unlike those full-featured ORM (such as the NHibernate or entity Framework), Petapoco is more focused on ease of use and performance than on rich functionality. Using Petapoco, you only need to introduce a C # file, you can use a strongly typed POCO (Plain old CLR Object), and support classes generated using the T4 template, and so on.

The most interesting features of Petapoco include:

    • can be associated with SQL Server, SQL Server CE, MySQL, PostgreSQL and the Oracle database work together.
    • included for insert/delete/update/ Multiple helper methods for Save and isnew.
    • support simple transaction
    • for page flipping requests, the total number of records is automatically calculated and a specific paging is obtained.
    • support parameter substitution, ability to fetch named parameters from object properties (named Parameters)
    • includes a SQL that consumes less resources Builder class
    • partial record update
    • includes T4 Templates, which can be used to generate Poco classes based on the database structure.

Detailed instructions and examples for all of these features are available on the Petapoco website.

In terms of performance, Petapoco is second only to dapper, at a slower pace than the manually coded data access layer (DAL, data access layers).

There are also tutorials that will help beginners, and they are a series of blog posts on the official website as well as some independent post tutorials. In addition, because Petapoco is an open source project, it is easy to add conditions to handle specific situations such as spatial data.

Recently, with the release of many open source projects, mini-ORM has begun to become a popular trend. Some other well-known applies to. NET projects are dapper and massive. Those mini-ORM are simpler and more efficient than full-fledged ORM, and micro-ORM often requires developers to write SQL statements manually rather than fully dynamically. They also do not require lengthy mapping files, because those mapping files can only make the process tedious for maintenance and debugging purposes.

Petapoco is a lightweight object-relational mapper for. NET Applications

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.