You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
given an action with a ViewModel parameter
public IActionResult Index(IndexViewModel model)
and a viewModel like this
public class IndexViewModel
{
public int MyProperty {get;set;}
}
i would like that
var url = Url.Action(r => r.Index(model));
generate
/Home/Index?MyProperty=5
How can i do that with TypedRouting ?
Thanks
The text was updated successfully, but these errors were encountered:
I am wondering about this as well. This case doesn't appear to work:
public IActionResult Index(int n){ ... }
public IActionResult Redirect(){
return this.RedirectToAction<HomeController>(a=>a.Index(1));
}
The RedirectToActionResult that is returned contains a null RouteValueDictionary. This works however, but it kinda negates the good part of having typed routing IMHO.
public IActionResult Redirect(){
return this.RedirectToAction<HomeController>(a=>a.Index(With.No<int>()), new{n=1});
}
Hi, thank you for your issue. Since I am overwhelmed with my other project https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc, I did not have a lot of time to support this one. Will try to publish a new package during the weekend. Thank you for your patience!
Hi,
given an action with a ViewModel parameter
public IActionResult Index(IndexViewModel model)
and a viewModel like this
public class IndexViewModel
{
public int MyProperty {get;set;}
}
i would like that
var url = Url.Action(r => r.Index(model));
generate
/Home/Index?MyProperty=5
How can i do that with TypedRouting ?
Thanks
The text was updated successfully, but these errors were encountered: