how to bring the control out of the sql statement once the where condition is met in C#
<pre><code> Stream stream = SystemStreams.Where(st =&gt; st.getName().Equals(s.OBJECT_NAME))
                              .Single();
</code></pre>

<p>in the above query in C# even if my condition of where clause is met my program reads all the records. due to which its becoming really slow. Can anyone help?</p>
