Having just spent a bunch of time trying to track down why an edit form wouldn't show up, I figured it out. So here is a tip to save you debugging time.
In your controller, you define some actions. In my case, it was Edit. The call looks like this:
public ActionResult Edit(string Id)
return View(new CustomerEditViewModel(Id));
Now, in my ListViewModel, I have a private method (Edit) that is passed to the EditCustomer property as a ViewAction. The code for that is also simple:
EditCustomer = new ViewAction(execute: Edit);
Ok, so here is the Edit code (with the error)
private void Edit(IViewAction a, object o)
if (SelectedCustomer == null)
var sinks = new ViewResultEventSinks();
sinks.ViewClosed += (s, e) =>
Controller.Notification("Refreshing customer list...");
Controller.Action("Customer", "Edit", new
CustomerID = SelectedCustomer.CustomerID
The field in the table and in the contract, etc. all refer to the field as CustomerID. So this looks just fine.
However, this will result in nothing happening when you double click on the item in the list.
The reason is that the variable specified in the Controller.Action MUST match the variable name defined in the controller (Id). Since Id != CustomerID,
the parameter is not found and so the method is not considered a match.
So to fix the above, you just need to change the Edit method to use:
Id = SelectedCustomer.CustomerID
Unfortunately, intellisense can't give you a clue as to what the parameter should be. And since this is part of the code you write, it's hard for the FW to even include a hint for you to know this.
Anyway, just a tip to save you some time....