title: OData "contains" vs Dynamics 365 Web API "contains"
body: <p>When querying Dynamics 365 via the Web API there are several operators to choose from to filter the queried data. One of those operators is <code>contains</code> which actually appears twice.</p>
  
  <p>One is the OData <code>contains</code> function (you'll find it under the heading 'Standard query functions'):</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/gg334767.aspx#Filter%20results" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/gg334767.aspx#Filter%20results</a></p>
  
  <p>Example:</p>
  
  <p><code>$filter=contains(name,'(sample)')</code></p>
  
  <p>The other one is an implementation of the Dynamics 365 Web API itself:</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/mt608053.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/mt608053.aspx</a></p>
  
  <p>I tried with this one, but only got a Generic SQL error:</p>
  
  <p><code>$filter=Microsoft.Dynamics.CRM.Contains(PropertyName='name',PropertyValue='(sample)')</code></p>
  
  <p>What's the difference? And maybe someone can even tell me how to call the Web API version of <code>contains</code> correctly?</p>