FLEUNT API WITH LINQ AND INNER JOIN
I am getting two different result if i use the following code.i need to do this as inner join if PGSID value is common
then it should get both value in one result
or
if its possible to give idoc as where condition in IdocFull?
IQueryable<Document> IdocFull = App.WorkWith()
.Documents()
.Where(dc => dc.Parent.Title == "SS"
&& dc.Status == ContentLifecycleStatus.Live)
.Get();
IQueryable<Document> idoc = App.WorkWith()
.Documents()
.Where(dcs => dcs.Parent.Title == "JPGroup"
&& dcs.Status == ContentLifecycleStatus.Live
&& dcs.GetValue("PGSID").Equals(UserEmailID))
.Get();
Thank you
Hi Jmr,
You can try the bellow code:
IQueryable<Document> IdocFull = App.WorkWith()
.Documents()
.Where(dc => dc.Parent.Title ==
"SS"
&& dc.Status == ContentLifecycleStatus.Live)
.Where(dc=> idoc.Contains(dc));
.Get();
Hi,
The following API working fine,now i want to check or get value using like operation For example dcs.GetValue("PGSID"). (or like ) Equals(UserEmailID)).
IQueryable<Document> idoc = App.WorkWith()
.Documents()
.Where(dcs => dcs.Parent.Title == "JPGroup"
&& dcs.Status == ContentLifecycleStatus.Live
&& dcs.GetValue("PGSID").Equals(UserEmailID))
.Get();
Thanking you.
Hello Jmr,
The && is used for AND, for OR you should use ||. What you can do is to cast the value to string and use contains: dcs.GetValue("PGSID").ToString().Contains(UserEmailID))
Best wishes,
Radoslav Georgiev
the Telerik team
Hello.
If i follow the above code i am getting the following error :Exception has been thrown by the target of an invocation.
Hi,
Here i am getting error like this for following API :
Hi Jmr,
Could it be possible that the ZIPCODE value is not set on some of your items and that the sZip variable exceets the length of the ZIPCODE field?
Greetings,
Radoslav Georgiev
the Telerik team