﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Indranil commented on Disabling Linq</title><description>Only works if you are referebcing the LuceneQuery through a IDocumentQuery. If you happen to have a reference to an IEnumerable which happens to be a LuceneQuery then the LINQ extension method will still get used.
</description><link>http://ayende.com/4655/disabling-linq#comment8</link><guid>http://ayende.com/4655/disabling-linq#comment8</guid><pubDate>Tue, 12 Oct 2010 15:05:27 GMT</pubDate></item><item><title>Omer Mor commented on Disabling Linq</title><description>Oren,
  
As Neil observed, there are many LINQ operators that can filter.
  
Even Single() with no predicate is filtering, and as such will cause a full query to hit the DB, only to be filtered back into a single item.
  
You should rethink this.
  
If you do want to use linq-to-objects, you'll just have to add a single .AsObservable() method and then you could go run with your scissors. :-)
</description><link>http://ayende.com/4655/disabling-linq#comment7</link><guid>http://ayende.com/4655/disabling-linq#comment7</guid><pubDate>Sun, 10 Oct 2010 21:13:26 GMT</pubDate></item><item><title>Neil Mosafi commented on Disabling Linq</title><description>But all the other methods mentioned take predicates to filter on, so it's the same thing.  I would never write:
  
  
.Where(x =&gt; x.Name == "ayende").FirstOrDefault();
  
  
But
  
  
.FirstOrDefault(x =&gt; x.Name == "ayende");
  
  
There are so many extension methods, do you really want to Obsolete them all?  Think I agree with Omer
</description><link>http://ayende.com/4655/disabling-linq#comment6</link><guid>http://ayende.com/4655/disabling-linq#comment6</guid><pubDate>Sun, 10 Oct 2010 19:03:26 GMT</pubDate></item><item><title>Scooletz commented on Disabling Linq</title><description>A descriptive obsolescence as in NH. Maybe you should allow these queries to be executed from another interface, like ImProbablyMakingAMistakeSession or sth like this?
</description><link>http://ayende.com/4655/disabling-linq#comment5</link><guid>http://ayende.com/4655/disabling-linq#comment5</guid><pubDate>Sun, 10 Oct 2010 19:01:27 GMT</pubDate></item><item><title>Ayende Rahien commented on Disabling Linq</title><description>Omer, but that would mean that we couldn't do things like:
  
First(), Single(), Count, etc
</description><link>http://ayende.com/4655/disabling-linq#comment4</link><guid>http://ayende.com/4655/disabling-linq#comment4</guid><pubDate>Sun, 10 Oct 2010 18:42:51 GMT</pubDate></item><item><title>Omer Mor commented on Disabling Linq</title><description>How about stop deriving IDocumentQuery from IEnumerable, and adding an .AsEnumerable() method to it?
  
This will make moving into the IEnumerable monad more explicit.
</description><link>http://ayende.com/4655/disabling-linq#comment3</link><guid>http://ayende.com/4655/disabling-linq#comment3</guid><pubDate>Sun, 10 Oct 2010 18:37:24 GMT</pubDate></item><item><title>gunteman commented on Disabling Linq</title><description>Good solution, not destroying the api but very clearly pointing the consumer in a better direction.
</description><link>http://ayende.com/4655/disabling-linq#comment2</link><guid>http://ayende.com/4655/disabling-linq#comment2</guid><pubDate>Sun, 10 Oct 2010 14:23:13 GMT</pubDate></item><item><title>tobi commented on Disabling Linq</title><description>Creative.
</description><link>http://ayende.com/4655/disabling-linq#comment1</link><guid>http://ayende.com/4655/disabling-linq#comment1</guid><pubDate>Sun, 10 Oct 2010 10:52:16 GMT</pubDate></item></channel></rss>