<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Specification Pattern and Lambdas</title>
	<atom:link href="http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/feed/" rel="self" type="application/rss+xml" />
	<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/</link>
	<description>Yet another Developer blog</description>
	<lastBuildDate>Fri, 18 Dec 2009 21:45:43 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ruadh</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-299</link>
		<dc:creator>ruadh</dc:creator>
		<pubDate>Fri, 26 Sep 2008 13:35:23 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-299</guid>
		<description>omg junior?!  is that you?!

.drc</description>
		<content:encoded><![CDATA[<p>omg junior?!  is that you?!</p>
<p>.drc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Blumhardt</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-298</link>
		<dc:creator>Nicholas Blumhardt</dc:creator>
		<pubDate>Wed, 10 Sep 2008 01:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-298</guid>
		<description>@Greg and @ang3lfir3, Expression[Func[T, bool]] is required (rather than just Func[T, bool]) if you want to use the specifications with a Linq-based data access framework.

If you use Func only, you&#039;re restricted to being able to test against only objects that are already in memory, which is inefficient when large numbers of objects are involved.

I took a shot at exactly that here: http://ubik.com.au/article/named/implementing_the_specification_pattern_with_linq - hopefully the article might shed some light on how specs using Linq can be used for the dual purposes of in-memory and database object selection.

Cheers!
Nick</description>
		<content:encoded><![CDATA[<p>@Greg and @ang3lfir3, Expression[Func[T, bool]] is required (rather than just Func[T, bool]) if you want to use the specifications with a Linq-based data access framework.</p>
<p>If you use Func only, you&#8217;re restricted to being able to test against only objects that are already in memory, which is inefficient when large numbers of objects are involved.</p>
<p>I took a shot at exactly that here: <a href="http://ubik.com.au/article/named/implementing_the_specification_pattern_with_linq" rel="nofollow">http://ubik.com.au/article/named/implementing_the_specification_pattern_with_linq</a> &#8211; hopefully the article might shed some light on how specs using Linq can be used for the dual purposes of in-memory and database object selection.</p>
<p>Cheers!<br />
Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Kohari</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-293</link>
		<dc:creator>Nate Kohari</dc:creator>
		<pubDate>Tue, 29 Jul 2008 15:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-293</guid>
		<description>@Mark: Func is functionally equivalent to Predicate, but Predicate (and the other .NET 2.0 delegate definitions) have been &quot;unofficially deprecated&quot; in .NET 3.5. I base this on the fact that LINQ uses Func exclusively.</description>
		<content:encoded><![CDATA[<p>@Mark: Func is functionally equivalent to Predicate, but Predicate (and the other .NET 2.0 delegate definitions) have been &#8220;unofficially deprecated&#8221; in .NET 3.5. I base this on the fact that LINQ uses Func exclusively.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ang3lfir3</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-292</link>
		<dc:creator>ang3lfir3</dc:creator>
		<pubDate>Tue, 29 Jul 2008 15:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-292</guid>
		<description>@Greg -- Thanks for the imput. I understand what you mean now and will be implementing your changes. As to null... I have since rewritten that bit in the constructor... I seem to always forget about that kind of thing. THANKS!!</description>
		<content:encoded><![CDATA[<p>@Greg &#8212; Thanks for the imput. I understand what you mean now and will be implementing your changes. As to null&#8230; I have since rewritten that bit in the constructor&#8230; I seem to always forget about that kind of thing. THANKS!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-291</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 29 Jul 2008 14:37:15 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-291</guid>
		<description>Why not make it a Predicate?</description>
		<content:encoded><![CDATA[<p>Why not make it a Predicate?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Beech</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-290</link>
		<dc:creator>Greg Beech</dc:creator>
		<pubDate>Tue, 29 Jul 2008 13:17:20 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-290</guid>
		<description>Seems a decent way to do it; I&#039;ve done similar things in the past to create a dynamic IComparer implementations. Couple of slight changes you might want to make though:

1. There&#039;s no need to take an Expression[Func[T,bool]] type, as this just means more work at runtime to compile it - instead you can just take a Func[T,bool] which will be compiled at compile-time.

2. You don&#039;t need to write _expression.Invoke(obj) - you can simply write _expression(obj) because it is a method in itself.

Also - you allow null in the constructor so should probably check for this in the IsSatisfiedBy method, because at the moment you could pass null to the constructor then get a NullReferenceException in that method.</description>
		<content:encoded><![CDATA[<p>Seems a decent way to do it; I&#8217;ve done similar things in the past to create a dynamic IComparer implementations. Couple of slight changes you might want to make though:</p>
<p>1. There&#8217;s no need to take an Expression[Func[T,bool]] type, as this just means more work at runtime to compile it &#8211; instead you can just take a Func[T,bool] which will be compiled at compile-time.</p>
<p>2. You don&#8217;t need to write _expression.Invoke(obj) &#8211; you can simply write _expression(obj) because it is a method in itself.</p>
<p>Also &#8211; you allow null in the constructor so should probably check for this in the IsSatisfiedBy method, because at the moment you could pass null to the constructor then get a NullReferenceException in that method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pages tagged "special"</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-289</link>
		<dc:creator>Pages tagged "special"</dc:creator>
		<pubDate>Tue, 29 Jul 2008 06:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-289</guid>
		<description>[...] bookmarks tagged special Specification Pattern and Lambdas&#160;saved by 1 others  &#160;&#160;&#160;&#160;mateohol1 bookmarked on 07/29/08 &#124; [...]</description>
		<content:encoded><![CDATA[<p>[...] bookmarks tagged special Specification Pattern and Lambdas&nbsp;saved by 1 others  &nbsp;&nbsp;&nbsp;&nbsp;mateohol1 bookmarked on 07/29/08 | [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alireza</title>
		<link>http://ang3lfir3.wordpress.com/2008/07/28/specification-pattern-and-lambdas/#comment-288</link>
		<dc:creator>Alireza</dc:creator>
		<pubDate>Tue, 29 Jul 2008 06:22:11 +0000</pubDate>
		<guid isPermaLink="false">http://ang3lfir3.wordpress.com/?p=36#comment-288</guid>
		<description>Hi ,
C# is gonna be a prominent language. Lambda Expression is one of the best features added , especially when pit into work in LINQ.
Have nice time working with C# ,</description>
		<content:encoded><![CDATA[<p>Hi ,<br />
C# is gonna be a prominent language. Lambda Expression is one of the best features added , especially when pit into work in LINQ.<br />
Have nice time working with C# ,</p>
]]></content:encoded>
	</item>
</channel>
</rss>
