'Petapoco - Value cannot be null. Parameter name: key

While trying to use

_database.Delete(pocoObjects);

I get the error: Value cannot be null. Parameter name: key



Solution 1:[1]

I should have been able to tell by the name, but I didn't realize the petapoco object I was trying to delete was a list.

Instead of: _database.Delete(pocoObjects);

I should be using: pocoObjects.ForEach(entity => database.Delete(entity));

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Post Impatica