My poco object looks like the following:
public class Poco
{
public int Id { get; set; }
public string Name { get; set; }
public string Url { get; set; }
[Ignore]
public string IgnoreMe { get; set; }
[Ignore]
public List<Page> Pages { get; set; }
}
When I run:
db.Insert("Poco", Poco);
It throws an exception because it still includes IgnoreMe
and the Pages
properties in the Insert statement. I also tried setting [ExplicitColumns]
, and it still tries to include everything.
I created a new web api project and put in the exact same code and Peta Poco version and it ignored the columns. I am using VS 2017 and the Web Api Template with the full .NET Framework (not core). It worked with the new project. The other project is not old either, but is there something that could prevent PetaPoco Ignore from not working
I found out if I have the PetaPoco nuget package installed in two different projects and one project references the other, this is what breaks it. The problem is I need PetaPoco to be installed in both because I need the attributes for one project and I need the query stuff for the other