I am using MVC 5 and I have helper extension methods for creating links and other Expression<Action<TController>> based URLs that trigger controller actions. These expressions are obviously not called when creating the view. They are used only for metadata.
Given this excerpt from my kind of razor,
@this.Form((AccountController c) => c.Register(null))
the compiler generates a warning:
Warning 1 Since this call is not expected, execution of the current method continues until the call ends. Consider applying "wait" as a result of a call.
This warning does not seem appropriate, because it can only be applied if this lambda was called, which, as I know, never happens.
Is there any way to suppress this? If not, I will probably make the action non-asynchronous.
recursive
source share