6

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?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Guy--L
  • 170
  • 2
  • 13

2 Answers2

3

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. ;)

Schotime
  • 15,707
  • 10
  • 46
  • 75
  • So far so good. I replace PetaPoco in PetaPoco.Generator.ttinclude with NPoco. And on line 149 of same, I changed autoIncrement to AutoIncrement. – Guy--L Jan 29 '13 at 04:40
  • I did make the tt file ugly in order to make Database.cs cute. Funny sort of dual-space that. – Guy--L Feb 06 '13 at 07:32
3

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

quentin-starin
  • 26,121
  • 7
  • 68
  • 86