convert IQueryable to

前端 未结 6 801
滥情空心
滥情空心 2020-12-16 18:01

I want to select my price level in database to compare with the an integer number. But It is error : Operator \'==\' cannot be applied to operands of type \'System.Linq.IQue

6条回答
  •  鱼传尺愫
    2020-12-16 18:58

    You need get the first item from your collection.

    if (list_pricelevel.First() == 3) {
       Response.Write("Welcome");
    }
    

提交回复
热议问题