ivaylokenov / AspNet.Mvc.TypedRouting

A collection of extension methods providing strongly typed routing and link generation for ASP.NET Core MVC projects.
https://mytestedasp.net/
MIT License
485 stars 36 forks source link

FromServices Parameters #31

Open ralbertazzi opened 7 years ago

ralbertazzi commented 7 years ago

Is there a way to avoid handling the [FromServices] parameters injected into the Action method?

ivaylokenov commented 7 years ago

@riccardoalbertazzi You can try using With.No<YourServiceHere>(). Is that convenient enough for you? Otherwise, the compiler will not let you execute the lambda expression.