 <p>Sluama - Your suggestion fixed it! Such an obvious answer. The " was terminating the Where clause string. I could have sworn I tried that, but I guess not. Becuase, I just happened to come back to this question and saw your answer and it works!</p> <pre><code>&lt;asp:EntityDataSource ID="EDSParts" runat="server" ConnectionString="name=TTEntities" DefaultContainerName="TTEntities" EnableFlattening="False" EntitySetName="Parts" OrderBy="it.ID DESC" Where ="(CASE WHEN (@PartNumber IS NOT NULL) THEN it.[Number] LIKE REPLACE(@PartNumber, '*', '%') ELSE it.[ID] IS NOT NULL END)"&gt; &lt;WhereParameters&gt; &lt;asp:ControlParameter Name="PartNumber" Type="String" ControlID="txtPartNumberQuery" PropertyName="Text" /&gt; &lt;/WhereParameters&gt; &lt;/asp:EntityDataSource&gt; </code></pre>