/README.markdown
Markdown | 109 lines | 82 code | 27 blank | 0 comment | 0 complexity | dbde34846affc242b98a3a22ad69a2ca MD5 | raw file
1<img align="right" alt="PetaPoco Logo" width="128" src="https://raw.githubusercontent.com/CollaboratingPlatypus/PetaPoco/master/Media/Logo2/PetaPocoLogo2_256.png"> 2 3# Welcome to the official PetaPoco repository 4 5Originally the brainchild of [Brad Robinson] 6 7## Version 6 - Netstandard 2.0+, 4.0, 4.5+ 8 9Read more about the [v6 update](https://github.com/CollaboratingPlatypus/PetaPoco/wiki/V6NetStandard2-0) 10 11PetaPoco is available from: **NuGet [PetaPoco.Complied](https://www.nuget.org/packages/PetaPoco.Compiled)** 12 13|Master|Development|Nuget| 14|:-----|:----------|:----| 15|[](https://ci.appveyor.com/project/collaboratingplatypus/petapoco/branch/master)|[](https://ci.appveyor.com/project/collaboratingplatypus/petapoco/branch/development)|[](https://www.nuget.org/packages/PetaPoco.Compiled/)| 16 17### Documentation 18 19For configuration, code examples and other general information [See the docs] 20 21### Add-ons 22 23* [PetaPoco.SqlKata](//github.com/asherber/PetaPoco.SqlKata) lets you use the powerful query builder [SqlKata](//sqlkata.com) to [build SQL queries](//github.com/CollaboratingPlatypus/PetaPoco/wiki/Building-SQL-Queries) for PetaPoco. 24* [StaTypPocoQueries.PetaPoco](//github.com/asherber/StaTypPocoQueries.PetaPoco) provides the ability to use some simple, strongly typed, Intellisensed LINQ expressions in your queries. 25* [PetaPoco.DBEntityGenerator](//github.com/hippasus/PetaPoco.DBEntityGenerator) lets you generate Pocos from your DB (T4 template replacement). 26 27## Version 5 - Legacy 28 29|Nuget (Single file)|Nuget Core (+t4 templates)|Nuget Core Compiled (dll)| 30|:----|:---------|:------------------| 31|[](https://www.nuget.org/packages/PetaPoco/)|[](https://www.nuget.org/packages/PetaPoco.Core)|[](https://www.nuget.org/packages/PetaPoco.Core.Compiled)| 32 33--- 34 35## PetaPoco is a tiny & fast micro-ORM for .NET 36 37* Like [Dapper], it's fast because it uses dynamic method generation (MSIL) to assign column values to properties 38* Like [Massive], it now also supports dynamic Expandos too 39* Like [ActiveRecord], it supports a close relationship between object and database table 40* Like [SubSonic], it supports generation of poco classes with T4 templates (V5 only) 41* Like [Massive] it's available as single file that you easily add to any project or complied. (V5 only) 42 43## Features at a Glance 44 45* Tiny, and absolutely no dependencies! 46* Asychronise or synchronise, the choice is yours. (aka async) (V6) 47* Works with strictly undecorated POCOs, or attributed almost-POCOs. 48* Easy to configure and includes [fluent configuration] out of the box. 49* Helper methods for Insert/Delete/Update/Save and IsNew 50* Paged requests automatically work out total record count and fetch a specific page. 51* Easy transaction support. 52* Better parameter replacement support, including grabbing named parameters from object properties. 53* Great performance by eliminating Linq and fast property assignment with DynamicMethod generation. 54* The query language is good ole SQL. 55* Includes a low friction SQL builder class that makes writing inline SQL *much* easier. 56* Includes T4 templates to automatically generate POCO classes for you. (V5) 57* Hooks for logging exceptions, installing value converters and mapping columns to properties without attributes. 58* Works with SQL Server, SQL Server CE, MS Access, SQLite, MySQL, MariaDB, Firebird, and PostgreSQL. (Oracle supported but does not have integration tests). 59* Works under Net Standard 2.0, .NET 4.0/4.5+ or Mono 2.8 and later. 60* Has [Xunit] unit tests. 61* Has supported DBs integration tests. 62* OpenSource (MIT License or Apache 2.0) 63 64## Super easy use and configuration 65 66Save an entity 67```c# 68 db.Save(article); 69 db.Save(new Article { Title = "Super easy to use PetaPoco" }); 70 db.Save("Articles", "Id", { Title = "Super easy to use PetaPoco", Id = Guid.New() }); 71``` 72 73Get an entity 74```c# 75 var article = db.Single<Article>(123); 76 var article = db.Single<Article>("WHERE ArticleKey = @0", "ART-123"); 77``` 78 79Delete an entity 80```c# 81 db.Delete(article); 82 db.Delete<Article>(123); 83 db.Delete("Articles", "Id", 123); 84 db.Delete("Articles", "ArticleKey", "ART-123"); 85``` 86 87Plus much much [more](https://github.com/CollaboratingPlatypus/PetaPoco/wiki). 88 89[Brad Robinson]:http://www.toptensoftware.com/ 90[Massive]:https://github.com/FransBouma/Massive 91[Dapper]:https://github.com/StackExchange/dapper-dot-net 92[SubSonic]:http://subsonic.github.io/ 93[ActiveRecord]:http://guides.rubyonrails.org/active_record_basics.html 94[POCO]:http://en.wikipedia.org/wiki/Plain_Old_CLR_Object 95[CodingHorror]:http://www.subsonicproject.com/docs/CodingHorror 96[XUnit]:https://github.com/xunit/xunit 97[See the docs]:https://github.com/CollaboratingPlatypus/PetaPoco/wiki 98[the contribution guide]:./contributing.md 99[Contributing to Open Source on GitHub]:https://guides.github.com/activities/contributing-to-open-source/ 100[we have a special place to honour them]:./honourRoll.md 101[fluent configuration]:https://github.com/CollaboratingPlatypus/PetaPoco/wiki/Fluent-Configuration 102 103## Contributing 104 105PetaPoco 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]. 106 107## Contributions Honour Roll 108 109A 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].