Search code examples
c#asp.net-mvcormpetapoco

Erron in PetaPoco integration


I am trying to use PetaPoco as my ORM.

As described on http://www.toptensoftware.com/petapoco/, I've tried Install-Package PetaPoco from nuget. But it ends with An error occurred while loading packages from'https://api.nuget.org/v3/index.json': The operation has timed out.

Then I downloaded and added PetaPoco.cs from https://github.com/toptensoftware/PetaPoco/blob/master/PetaPoco/PetaPoco.cs

But still I'm getting 73 errors.

The type or namespace name 'Internal' does not exist in the namespace 'PetaPoco'
The name 'DatabaseType' does not exist in the current context
The type or namespace name 'ITransaction' could not be found
.....
.....

Any help ?


Solution

  • Try the nuget package again. The file you downloaded isn't the single file version. The single file version is built at compile time and packaged as a nuget package. Don't forget PetaPoco comes in three versions. Please see the wiki