<?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 feature: projection</title>
	<atom:link href="http://lostechies.com/jimmybogard/2009/02/21/automapper-feature-projection/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2009/02/21/automapper-feature-projection/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Sun, 19 May 2013 03:22:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Tim</title>
		<link>http://lostechies.com/jimmybogard/2009/02/21/automapper-feature-projection/#comment-1349</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 13 Oct 2010 04:24:17 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/21/automapper-feature-projection.aspx#comment-1349</guid>
		<description>Is it possible to do partial mapping, ie we have large forms that are split across multiple pages. We have view models for each form but we have to map all of the data back.

The requirement for all source members to be mapped makes this difficult.</description>
		<content:encoded><![CDATA[<p>Is it possible to do partial mapping, ie we have large forms that are split across multiple pages. We have view models for each form but we have to map all of the data back.</p>
<p>The requirement for all source members to be mapped makes this difficult.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://lostechies.com/jimmybogard/2009/02/21/automapper-feature-projection/#comment-1348</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 22 Apr 2009 05:04:47 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/21/automapper-feature-projection.aspx#comment-1348</guid>
		<description>Automapper is a great little tool, we just started using it on one of our projects.  The syntax is very fluid.  Good work!</description>
		<content:encoded><![CDATA[<p>Automapper is a great little tool, we just started using it on one of our projects.  The syntax is very fluid.  Good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lubos</title>
		<link>http://lostechies.com/jimmybogard/2009/02/21/automapper-feature-projection/#comment-1347</link>
		<dc:creator>Lubos</dc:creator>
		<pubDate>Tue, 24 Feb 2009 11:09:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/21/automapper-feature-projection.aspx#comment-1347</guid>
		<description>I like Jimmy&#039;s version because it&#039;s done declarative way and without possible side-effects. That&#039;s big win for me.

Jimmy could still simplify .ForMember method

for example:

.ForMember(dest =&gt; dest.EventDate, opt =&gt; opt.MapFrom(src =&gt; src.EventDate.Date))

could also become

.ForMember(dest =&gt; dest.EventDate, src =&gt; src.EventDate.Date)

I have no idea why MapFrom method is so important.</description>
		<content:encoded><![CDATA[<p>I like Jimmy&#8217;s version because it&#8217;s done declarative way and without possible side-effects. That&#8217;s big win for me.</p>
<p>Jimmy could still simplify .ForMember method</p>
<p>for example:</p>
<p>.ForMember(dest => dest.EventDate, opt => opt.MapFrom(src => src.EventDate.Date))</p>
<p>could also become</p>
<p>.ForMember(dest => dest.EventDate, src => src.EventDate.Date)</p>
<p>I have no idea why MapFrom method is so important.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Smits</title>
		<link>http://lostechies.com/jimmybogard/2009/02/21/automapper-feature-projection/#comment-1346</link>
		<dc:creator>Ramon Smits</dc:creator>
		<pubDate>Tue, 24 Feb 2009 09:11:38 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/02/21/automapper-feature-projection.aspx#comment-1346</guid>
		<description>I see benefits in using the automapper but why whould I use it for these kind of mappings? As doing the mapping in normal code would be much more readable.

You could ofcourse just add this code into the mapper. Something like:

Mapper.CreateMap&lt;CalendarEvent, CalendarEventForm&gt;(delegate(CalendarEvent src, CalendarEventForm dst){
   var date = src.EventDate;
   dst.EventData = date.Date;
   dst.EventHour = date.Hour;
   dst.EventMinute = date.Minute;
});

Much more readable the the mapping code.

</description>
		<content:encoded><![CDATA[<p>I see benefits in using the automapper but why whould I use it for these kind of mappings? As doing the mapping in normal code would be much more readable.</p>
<p>You could ofcourse just add this code into the mapper. Something like:</p>
<p>Mapper.CreateMap<calendarevent , CalendarEventForm>(delegate(CalendarEvent src, CalendarEventForm dst){<br />
   var date = src.EventDate;<br />
   dst.EventData = date.Date;<br />
   dst.EventHour = date.Hour;<br />
   dst.EventMinute = date.Minute;<br />
});</p>
<p>Much more readable the the mapping code.</p>
<p></calendarevent></p>
]]></content:encoded>
	</item>
</channel>
</rss>
