title: Ria DomainService input parameter weirdness, Delete is special?
body: <p>In a RIA Domain service I have added some utility functions. For instance we have...</p>
  
  <pre><code>public virtual CmsDealer GetCmsDealerById(string id)
  {
      return this.Context.CmsDealerSet
          .Include("CmsItemState")
          .FirstOrDefault(p =&gt; p.Id == id);
  }
  </code></pre>
  
  <p>Now that function has it's own issues if the id is nonexistant, but lets table that for now. The important thing is that function compiles and executes.</p>
  
  <p>However a similar function...</p>
  
  <pre><code>public virtual void DeleteCmsDealerById(string id)
  {
      var dealer = this.Context.CmsDealerSet
          .FirstOrDefault(d =&gt; d.Id == id);
  
      if (dealer != null)
      {
          DeleteCmsDealer(dealer);
      }
  }
  </code></pre>
  
  <p>Tosses a compile time error. </p>
  
  <pre><code>*Parameter 'id' of domain method 'DeleteCmsDealerById' must be an entity type exposed by the DomainService, either directly via a query operation, or indirectly via an included association.*
  </code></pre>
  
  <p>The thing is, I can understand that the (string id) param is not accewptable to EF, but why is it OK in one case and not another?</p>
  
  <p>Input welcome :)</p>