title: LIKE on DECIMAL fields
body: <p>I have a search section which would let the users to see orders based on values entered in the Search Box. If the searching value is not entered (for e.g., dates, customer name, sales price etc), top 10 records with OrderDate DESC will be shown. Table with required columns are below.</p>
  
  <pre><code>CREATE TABLE OrderDetails
  (
      OrderId INT IDENTITY(1, 1) PRIMARY KEY,
      OrderPrice NUMERIC(18, 2),
      OrderDate DATETIME  
  )
  
  INSERT INTO dbo.OrderDetails
  SELECT 100.18 OrderPrice, GETDATE() OrderDate
  UNION ALL
  SELECT 300.62 OrderPrice, GETDATE() OrderDate
  UNION ALL
  SELECT 9300.12 OrderPrice, GETDATE() OrderDate
  </code></pre>
  
  <p>Whenever the user enters SalesPrice, I would like to run a query like below in VB.Net from EntityFramework. <strong>Note that SalesPrice is DECIMAL field</strong>.</p>
  
  <pre><code>SELECT * FROM dbo.OrderDetails WHERE OrderPrice LIKE '%9300%'
  </code></pre>
  
  <p>I am using System.Data.Entity.dll <strong>version 3.5.0.0</strong>. I started writing it as below:</p>
  
  <pre><code>Dim query = From o In e.OrderDetails Select o
  If (Not String.IsNullOrEmpty(sPrice)) Then
     query = query.Where(Function(i) i.SalesPrice.ToString().Contains(sPrice))
  End If
  </code></pre>
  
  <p>Please note that the SalesPrice is a DECIMAL field and I could not use Contains. Hence I had to use a ToString(). But I get the below error. </p>
  
  <pre><code>LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression.
  </code></pre>
  
  <p>Any helps are appreciated....</p>