Could someone please clarify something for me. In my ASP.NET MVC 2 app, I\'ve got a BaseViewModel
class which includes the following method:
pu
I was actually searching for a similar error and Google sent me here to this question. The error was:
The type arguments for method 'IModelExpressionProvider.CreateModelExpression(ViewDataDictionary, Expression>)' cannot be inferred from the usage
I spent maybe 15 minutes trying to figure it out. It was happening inside a Razor .cshtml view file. I had to comment portions of the view code to get to where it was barking since the compiler didn't help much.
Can you spot it? Yeah... I re-checked it maybe twice and didn't get it at first!
See that the ViewModel's property is just Zip
when it should be Organization.Zip
. That was it.
So re-check your view source code... :-)