Massive and multiple arguments

I thought that Massive would simple let me do something like this:

table.Delete(where: "Pin_Added = @0 and Pin_Schools <> @1", 
             args: new { pinAdded, pinSelected });

That would be slick! But I get something more like this:

lettering-kaboom

It turns out that that fancy anonymous object doesn’t get parsed. I tried to grab some of the fancy tricks from the MVC source code, like this:

RouteValueDictionary result = new RouteValueDictionary();

if (htmlAttributes != null) {
    foreach (PropertyDescriptor property in 
    			TypeDescriptor.GetProperties(htmlAttributes)) {
        result.Add(property.Name.Replace('_', '-'), 
        		property.GetValue(htmlAttributes));
    }
}

return result;

But that did not work. I found this post on DataChomp that solved my woes:

object[] args = { pinAdded, pinSelected };
table.Delete(where: "Pin_Added = @0 and Pin_Schools <> @1", args: args);