Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

C#

Linq: Basic Query

1
2
3
var MyArt = from t in ArticleRepo.Articles
                        where t.Id != 1
                        select t;
https://snipt.net/embed/35a94a97ceae53fbe6ccacaa9d7a7d34/
https://snipt.net/raw/35a94a97ceae53fbe6ccacaa9d7a7d34/
35a94a97ceae53fbe6ccacaa9d7a7d34
csharp
C#
3
2016-12-05T03:05:59
True
False
False
/api/public/snipt/60327/
linq-basic-query
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="kt">var</span> <span class="n">MyArt</span> <span class="p">=</span> <span class="k">from</span> <span class="n">t</span> <span class="k">in</span> <span class="n">ArticleRepo</span><span class="p">.</span><span class="n">Articles</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">where</span> <span class="n">t</span><span class="p">.</span><span class="n">Id</span> <span class="p">!=</span> <span class="m">1</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">select</span> <span class="n">t</span><span class="p">;</span> </span></pre></div> </td></tr></table>
linq
Copyrighted, illegal, or inappropriate content? Email [email protected].