mccalltd/AttributeRouting — Issue #47: Translation Provider: Problem with RouteUrl and Actions with Optional parameters
Author: shapper
Created: 2012-02-13 21:26:06+00:00
State: open

Hello,

I have the following action:

[GET("Users")]
public virtual ActionResult Index(Int32 p = 1) {
}

When I add a translation I get the following:

AddTranslations().ForController()
.RouteUrl(x => x.Index(), new Dictionary {
{ "pt", "Utilizadores" }
});

I get the following error:

An expression tree may not contain a call or invocation that uses optional arguments

Any idea how to solve this?

Thank You,
Miguel