Master | Development | Nuget | Nuget Core | Nuget Core Compiled |
---|---|---|---|---|
Originally the brainchild of Brad Robinson,
- Like Massive it's a single file that you easily add to any project
- Unlike Massive it works with strongly typed POCO's
- Like Massive, it now also supports dynamic Expandos too - read more
- Like ActiveRecord, it supports a close relationship between object and database table
- Like SubSonic, it supports generation of poco classes with T4 templates
- Like Dapper, it's fast because it uses dynamic method generation (MSIL) to assign column values to properties
- Tiny, no dependencies... a single C# file you can easily add to any project.
- Works with strictly undecorated POCOs, or attributed almost-POCOs.
- 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.
- Includes T4 templates to automatically generate POCO classes for you.
- The query language is SQL... no weird fluent or Linq syntaxes (yes, matter of opinion)
- Includes a low friction SQL builder class that makes writing inline SQL much easier.
- Hooks for logging exceptions, installing value converters and mapping columns to properties without attributes.
- Works with SQL Server, SQL Server CE, MySQL, PostgreSQL and Oracle.
- Works under .NET 4.0/4.5/4.6 or Mono 2.8 and later.
- Experimental support for
dynamic
under .NET 4.0 and Mono 2.8 - Xunit unit tests.
- OpenSource (Apache License)
- All of this in about 1,500 lines of code
For configuration, code examples and other general information See the docs
PetaPoco welcomes input form 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.
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.
PetaPoco is available from:
- NuGet Peta - https://www.nuget.org/packages/PetaPoco/
- NuGet Peta Core - https://www.nuget.org/packages/PetaPoco.Core/
- NuGet Peta Core Compiled - https://www.nuget.org/packages/PetaPoco.Core.Compiled/