Loic.CollaboratingPlatypus.PetaPoco 1.0.0

dotnet add package Loic.CollaboratingPlatypus.PetaPoco --version 1.0.0                
NuGet\Install-Package Loic.CollaboratingPlatypus.PetaPoco -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Loic.CollaboratingPlatypus.PetaPoco" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Loic.CollaboratingPlatypus.PetaPoco --version 1.0.0                
#r "nuget: Loic.CollaboratingPlatypus.PetaPoco, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Loic.CollaboratingPlatypus.PetaPoco as a Cake Addin
#addin nuget:?package=Loic.CollaboratingPlatypus.PetaPoco&version=1.0.0

// Install Loic.CollaboratingPlatypus.PetaPoco as a Cake Tool
#tool nuget:?package=Loic.CollaboratingPlatypus.PetaPoco&version=1.0.0                

<img align="right" alt="PetaPoco Logo" width="128" src="https://raw.githubusercontent.com/CollaboratingPlatypus/PetaPoco/master/Media/Logo2/PetaPocoLogo2_256.png">

Welcome to the official PetaPoco repository

Originally the brainchild of Brad Robinson.

PetaPoco is currently maintained and exteneded by Wade Baglin (@pleb) and Aaron Sherber (@asherber).

Version 6 - Netstandard 2.0+, 4.0, 4.5+

Read more about the v6 update

PetaPoco is available from: NuGet PetaPoco.Compiled

Master Development Nuget
Build status Build status Nuget Downloads

Documentation

For configuration, code examples and other general information See the docs

Add-ons

Version 5 - Legacy

Nuget (Single file) Nuget Core (+t4 templates) Nuget Core Compiled (dll)
Nuget Downloads Nuget Downloads core Nuget Downloads core

PetaPoco is a tiny & fast micro-ORM for .NET

  • Like Dapper, it's fast because it uses dynamic method generation (MSIL) to assign column values to properties
  • Like Massive, it now also supports dynamic Expandos too
  • Like ActiveRecord, it supports a close relationship between object and database table
  • Like SubSonic, it supports generation of poco classes with T4 templates (V5 only)
  • Like Massive it's available as single file that you easily add to any project or complied. (V5 only)

Features at a Glance

  • Tiny, and absolutely no dependencies!
  • Asychronise or synchronise, the choice is yours. (aka async) (V6)
  • Works with strictly undecorated POCOs, or attributed almost-POCOs.
  • Easy to configure and includes fluent configuration out of the box.
  • Helper methods for Insert/Delete/Update/Save and IsNew
  • Paged requests automatically work out total record count and fetch a specific page.
  • Easy transaction support.
  • Better parameter replacement support, including grabbing named parameters from object properties.
  • Great performance by eliminating Linq and fast property assignment with DynamicMethod generation.
  • The query language is good ole SQL.
  • Includes a low friction SQL builder class that makes writing inline SQL much easier.
  • Includes T4 templates to automatically generate POCO classes for you. (V5)
  • Hooks for logging exceptions, installing value converters and mapping columns to properties without attributes.
  • Works with SQL Server, SQL Server CE, MS Access, SQLite, MySQL, MariaDB, Firebird, and PostgreSQL. (Oracle supported but does not have integration tests).
  • Works under Net Standard 2.0, .NET 4.0/4.5+ or Mono 2.8 and later.
  • Has Xunit unit tests.
  • Has supported DBs integration tests.
  • OpenSource (MIT License or Apache 2.0)

Super easy use and configuration

Save an entity

    db.Save(article);
    db.Save(new Article { Title = "Super easy to use PetaPoco" });
    db.Save("Articles", "Id", { Title = "Super easy to use PetaPoco", Id = Guid.New() });

Get an entity

    var article = db.Single<Article>(123);
    var article = db.Single<Article>("WHERE ArticleKey = @0", "ART-123");

Delete an entity

    db.Delete(article);
    db.Delete<Article>(123);
    db.Delete("Articles", "Id", 123);
    db.Delete("Articles", "ArticleKey", "ART-123");

Plus much much more.

Contributing

PetaPoco welcomes input from the community. After all, what is a product without users? If you’d like to contribute, please take the time to read the contribution guide. We would also suggest you have a quick read of Contributing to Open Source on GitHub.

Contributions Honour Roll

A product like PetaPoco isn't the effort of one person, but rather a combined effort of many. For those individuals who rise above and beyond we have a special place to honour them.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 0 7/31/2021