Note that there are some explanatory texts on larger screens.

plurals
  1. POLinq in monotouch (debugging on device)
    text
    copied!<p>I am trying to run a Windows Azure Mobile Services query (using xamarins monotouch fork of the SDK).</p> <p>This code runs fine on the Simulator but it blows up on the device:</p> <pre><code>this.table.Where (a =&gt; a.Sequence == sequence).Where (a =&gt; a.Week == week).ToListAsync() .ContinueWith (t =&gt; { this.items = t.Result; this.tableView.ReloadData (); IsUpdating = false; }, scheduler); </code></pre> <p>The error I get is:</p> <blockquote> <p>Exception has been thrown by the target of an invocation. ---> System.Exception: Attempting to JIT compile method 'System.Linq.jvm.Runner:GetDelegate ()' while running with --aot-only.</p> </blockquote> <p>The only thing I´ve managed to do to make it work is removing the where conditions. This works just fine except I (obviously) dont get the results filtered as needed.</p> <p>How should I rewrite my code to make it work on an actual iOS device?</p> <p>UPDATE: table is a class variable of type *<em>IMobileServiceTable &lt; Activity > *</em></p> <p>week and sequence are both of type <strong>int</strong>.</p> <p>Activity is a POCO class.</p> <pre><code> public class Activity { public int ID { get; set; } public string Name { get; set; } public int CaloricRequirementMin { get; set; } public int CaloricRequirementMax { get; set; } public string Difficulty { get; set; } public int PlanId {get;set;} public string Type { get; set; } public int Sequence { get; set; } public int Week { get; set; } public int SubscriptionActivityId { get; set; } } </code></pre> <p>I have double checked to make sure that these are both populated.</p> <p>It words flawlessly on simulator.</p>
 

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