Are lambda expressions supported by Razor?
问题 Are lambda expressions/anonymous methods supported in the Razor view engine? I am having difficulty expressing the following in Razor: @Model.ToList().ForEach(i => { if (i.DealerName != null) { <text> @i.DealerName </text> } } Note: I know can solve this with @foreach but I need a similar solution for a 3rd party MVC control. It using this mechanism for setting the content of the control. It works fine for MVC .ASPX views but cannot get it to work with Razor. MVC .ASPX equivalent (the code I