I think you are missing using System.Linq; from this system class.
using System.Linq;
and also add using System.Data.Entity; to the code
using System.Data.Entity;
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