1

Closed

Expression 'x => (ToString(x.get_Item("Тип контента")) = "Заявка")' can not be translated into CAML

description

This is my code:

string caml = Camlex.Query().Where(x => Convert.ToString( x["Тип контента"]) == "Заявка").ToString();

When it comes to its execution I get the following exception:

Expression 'x => (ToString(x.get_Item("Тип контента")) = "Заявка")' can not be translated into CAML


What's wrong with my code?
Closed Dec 15, 2012 at 7:31 PM by sadomovalex

comments

sadomovalex wrote May 24, 2012 at 1:59 PM

hi senglory,
try explicit cast instead Convert.ToString() call:
string caml = Camlex.Query().Where(x => (string)x["Тип контента"] == "Заявка").ToString();