I am trying to figure out if I can do this, and how..
I have an action result defined this way :
public virtual JsonResult Created(string tableName, object where)
{
....some code
}
I am using T4MVC and I am trying to call the action result like this:
MVC.MyController.Created("MyTable", new { Name = "Matt", Age = 11})
But in the controller the where parameter has a type of object {string[]} and it has only one entry and that one looks like this:
where[0]="{ Name = "Matt", Age = 11 }"
Is there a way to get the where parameter as an anonymous type in MyController?
Update:
The Created method is called every few seconds to look in the database and return true if a certain row is created.This is the method that calls the Created method:
public virtual ActionResult WaitingForUpdate(JsonResult pollAction, string redirectToOnSave = null)
{
return View("CommandSentPartial", new CommandSentModel
{
Message = "Waiting for update",
PollAction = pollAction,
RedirectTo = redirectToOnSave
});
}
and then I am calling
WaitingForUpdate(MVC.MyController.Created("MyTable", new { Name = "Matt", Age = 11}))