Cannot convert lambda expression to type 'string' because it is not a delegate type [duplicate] Cannot convert lambda expression to type 'string' because it is not a delegate type [duplicate] asp.net asp.net

Cannot convert lambda expression to type 'string' because it is not a delegate type [duplicate]


I think you are missing using System.Linq; from this system class.

and also add using System.Data.Entity; to the code


In my case, I had to add using System.Data.Entity;


My case it solved i was using

@Html.DropDownList(model => model.TypeId ...)  

using

@Html.DropDownListFor(model => model.TypeId ...) 

will solve it