title: Querying Azure Mobile App TableController
body: <p>I'm using Azure Mobile Apps and TableControllers in my project. Development has been going quite smoothly, until now. One of my tables relies on quite a bit of business logic in order to return the appropriate entities back to the client. To perform this business logic I need to get some parameters from the client (specifically, a date range). </p>
  
  <p>I know I could use an APIController to return the data, but won't that break the entity syncing that's provided by the SyncTables in Xamarin?</p>
  
  <p>My current logic in my GetAll is:</p>
  
  <pre><code>public IQueryable&lt;WorkItemDTO&gt; GetAllWorkItem()
      {
          //Return all the work items that the user owns or has been assigned as a resource.
          var query = MappedDomainManager.QueryEntity().Where(x =&gt; x.OwnerId == UserProfileId || x.Resources.Where(r =&gt; r.AssignedResourceId == UserProfileId).Count() &gt; 0);
  
          return query.Project().To&lt;WorkItemDTO&gt;();
      }
  </code></pre>
  
  <p>What I would like is to be able to somehow pass through a start and end date that I can then use to build up my list of WorkItemDTO objects. The main problem is that a WorkItem entity can actually spawn off multiple WorkItemDTO objects as a WorkItem can be set to be recurring. So for example say a WorkItem is recurring once a week, and the user wants to see a calendar for 1 month, that single WorkItem will spawn 4 separate concrete WorkItemDTO objects.</p>
  
  <p>Then when a user modifies one of those WorkItemDTO objects on the client side, I want it to be sent back as a patch that creates its own WorkItem entity.</p>
  
  <p>Does anyone know how I can get a TableController to receive parameters? Or how to get an APIController to work so that client syncing isn't affected?</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks</p>
  
  <p>Jacob</p>