Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PetaPoco vs NPoco

NPoco seems to be a DLL that implments more advanced features of PetaPoco. PetaPoco installs code generation templates and PetaPoco.cs. The Nuget version of PetaPoco is 4.0.3. I know there are versions (ie., 4.0.12) that implement some of the features in NPoco.

How do I use the code generation in PetaPoco and the latest features in NPoco together?

like image 610
Guy--L Avatar asked Jan 06 '13 21:01

Guy--L


People also ask

What is NPoco?

NPoco is a simple C# micro-ORM that maps the results of a query onto a POCO object. NPoco is a fork of PetaPoco with a handful of extra features. And NPoco ORM can be used with . NET Core.

What is PetaPoco?

PetaPoco is a thin Object Relational Mapper (ORM) for . NET applications. Unlike full-fledged ORMs like NHibernate or Entity Framework, the emphasis is on simplicity of use and performance rather than richness of features.


2 Answers

You should be able to use the PetaPoco code generation stuff with NPoco, however I have not tested it as I do not use/like it.

Most of the methods are the same, but you might have to tweak them slightly. You can just place the TT files into your project and run them as well as adding NPoco to your project.

If you do get them working, let me know and I may consider adding them back into NPoco. ;)

like image 115
Schotime Avatar answered Sep 21 '22 15:09

Schotime


You can use this project's T4 templates to generate classes backed by NPoco

like image 22
quentin-starin Avatar answered Sep 20 '22 15:09

quentin-starin