<?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/"
		>
<channel>
	<title>Comments on: AutoMapper DSL design post-mortem</title>
	<atom:link href="http://lostechies.com/jimmybogard/2009/12/23/automapper-dsl-design-post-mortem/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2009/12/23/automapper-dsl-design-post-mortem/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Wed, 22 May 2013 13:39:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/12/23/automapper-dsl-design-post-mortem/#comment-2134</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Thu, 07 Jan 2010 13:20:03 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/12/23/automapper-dsl-design-post-mortem.aspx#comment-2134</guid>
		<description>@Betty

As it is right now, you don&#039;t need static objects.  The Mapper static class is merely a wrapper around the configuration/engine objects that do the real work.</description>
		<content:encoded><![CDATA[<p>@Betty</p>
<p>As it is right now, you don&#8217;t need static objects.  The Mapper static class is merely a wrapper around the configuration/engine objects that do the real work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Betty</title>
		<link>http://lostechies.com/jimmybogard/2009/12/23/automapper-dsl-design-post-mortem/#comment-2133</link>
		<dc:creator>Betty</dc:creator>
		<pubDate>Thu, 07 Jan 2010 03:16:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/12/23/automapper-dsl-design-post-mortem.aspx#comment-2133</guid>
		<description>I&#039;m a fan of creating a class for each mapping, meaning i&#039;d love something like.

public class MappingClass1 : Mapping&lt;Source, Destination&gt; {
	public override CreateMapping() {
		Map(s =&gt; s.Property, d =&gt; d.Property);
		Map(s =&gt; s.Property2, d = d.Property2);
	}
}

Which then get registered to a AutoMapper Profile

new AutoMapperConfig() { new MappingClass1(), new MappingClass2() };

I could then use it with an IoC library like ninject

Bind&lt;IAutoMapper&gt;().ToMethod(i =&gt; new AutoMapperConfig() { new MappingClass1(), new MappingClass2() } );

public Destination SomeFunction(IAutoMapper mapper) {
	var source = new Source();
	return mapper.Map(source);a
}

Probably not the best design, but would at least mean I don&#039;t need static objects anymore.</description>
		<content:encoded><![CDATA[<p>I&#8217;m a fan of creating a class for each mapping, meaning i&#8217;d love something like.</p>
<p>public class MappingClass1 : Mapping<source , Destination> {<br />
	public override CreateMapping() {<br />
		Map(s => s.Property, d => d.Property);<br />
		Map(s => s.Property2, d = d.Property2);<br />
	}<br />
}</p>
<p>Which then get registered to a AutoMapper Profile</p>
<p>new AutoMapperConfig() { new MappingClass1(), new MappingClass2() };</p>
<p>I could then use it with an IoC library like ninject</p>
<p>Bind<iautomapper>().ToMethod(i => new AutoMapperConfig() { new MappingClass1(), new MappingClass2() } );</p>
<p>public Destination SomeFunction(IAutoMapper mapper) {<br />
	var source = new Source();<br />
	return mapper.Map(source);a<br />
}</p>
<p>Probably not the best design, but would at least mean I don&#8217;t need static objects anymore.</iautomapper></source></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NIcholas Blumhardt</title>
		<link>http://lostechies.com/jimmybogard/2009/12/23/automapper-dsl-design-post-mortem/#comment-2132</link>
		<dc:creator>NIcholas Blumhardt</dc:creator>
		<pubDate>Mon, 28 Dec 2009 04:16:39 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/12/23/automapper-dsl-design-post-mortem.aspx#comment-2132</guid>
		<description>An alternative to nested closures (sometimes better, sometimes worse) is the Builder pattern. Build() plays the role of that hokey &quot;Finalize&quot;. Not always appropriate, but another good tool to have in the box.</description>
		<content:encoded><![CDATA[<p>An alternative to nested closures (sometimes better, sometimes worse) is the Builder pattern. Build() plays the role of that hokey &#8220;Finalize&#8221;. Not always appropriate, but another good tool to have in the box.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarod</title>
		<link>http://lostechies.com/jimmybogard/2009/12/23/automapper-dsl-design-post-mortem/#comment-2131</link>
		<dc:creator>Jarod</dc:creator>
		<pubDate>Wed, 23 Dec 2009 18:36:19 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/12/23/automapper-dsl-design-post-mortem.aspx#comment-2131</guid>
		<description>&quot;With method chaining, you never really know that a configuration operation is finished, unless you put in some hokey “Finalize()” method or something.&quot;

I thought nested closure was &#039;cool&#039;, but could not see this benefit. 

Nested closure SOLD! Thanks.</description>
		<content:encoded><![CDATA[<p>&#8220;With method chaining, you never really know that a configuration operation is finished, unless you put in some hokey “Finalize()” method or something.&#8221;</p>
<p>I thought nested closure was &#8216;cool&#8217;, but could not see this benefit. </p>
<p>Nested closure SOLD! Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gilligan</title>
		<link>http://lostechies.com/jimmybogard/2009/12/23/automapper-dsl-design-post-mortem/#comment-2130</link>
		<dc:creator>Gilligan</dc:creator>
		<pubDate>Wed, 23 Dec 2009 15:30:22 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/12/23/automapper-dsl-design-post-mortem.aspx#comment-2130</guid>
		<description>I always wondered about that Configure() method. </description>
		<content:encoded><![CDATA[<p>I always wondered about that Configure() method. </p>
]]></content:encoded>
	</item>
</channel>
</rss>
