Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to write 'In' queries in WCF Data Services?
    primarykey
    data
    text
    <p>How to write 'In' queries in <strike>Ado.Net</strike> WCF Data Services? I have tried the following code.</p> <pre><code>IList&lt;int&gt; orderIds = new List&lt;int&gt; { 59810, 59811, 59812, 59813, 59814 }; var lstorders = _context.Orders .Where(o =&gt; orderIds.Contains(o.customerId)) .ToList&lt;Orders&gt;(); </code></pre> <p>But the above code is not working. I am getting following error.</p> <blockquote> <p>Test 'MyTest' failed: System.NotSupportedException : The expression (([10007].customerId != null) And value(System.Collections.Generic.List<code>1[System.Int32]).Contains([10007].customerId.Value)) is not supported. at System.Data.Services.Client.ExpressionWriter.ExpressionToString(DataServiceContext context, Expression e) at System.Data.Services.Client.UriWriter.VisitQueryOptionExpression(FilterQueryOptionExpression fqoe) at System.Data.Services.Client.UriWriter.VisitQueryOptions(ResourceExpression re) at System.Data.Services.Client.UriWriter.VisitResourceSetExpression(ResourceSetExpression rse) at System.Data.Services.Client.DataServiceALinqExpressionVisitor.Visit(Expression exp) at System.Data.Services.Client.UriWriter.Translate(DataServiceContext context, Boolean addTrailingParens, Expression e, Uri&amp; uri, Version&amp; version) at System.Data.Services.Client.DataServiceQueryProvider.Translate(Expression e) at System.Data.Services.Client.DataServiceQuery</code>1.Execute() at System.Data.Services.Client.DataServiceQuery<code>1.GetEnumerator() at System.Collections.Generic.List</code>1..ctor(IEnumerable<code>1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable</code>1 source)</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload