convert IQueryable to

前端 未结 6 802
滥情空心
滥情空心 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 19:07

    var list_pricelevel

    This is per definition not an int because more than one row can be returned.

    I don't use SQL syntax (only lambda) but at the end you want the equivalent of a .FirstOrDefault or Single or First. Basically taking the first row.

提交回复
热议问题