ラムダ式を使用してクエリを実行できるように、動的な値のセットをキャストしようとしていますが、コレクションをIEnumerable次のようにキャストするとエラーが発生し続けます。
(IEnumerable<MyClass>ViewBag.MyClassList)
エラーの原因
Using the generic type System.Collections.Generic.IEnumerable<T> requires 1 type arguments
と
MyClass is a 'type', which is not valid in the given context
これは文字通り意味がありません。IEnumerabletype が必要ですが、 type を使用していis not valid in the given contextます。
ハーフ?