<?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: Fluent NHibernate: Conventions Rewrite</title>
	<atom:link href="http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/feed/" rel="self" type="application/rss+xml" />
	<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/</link>
	<description>Monkeying with the code</description>
	<lastBuildDate>Tue, 29 Jun 2010 13:30:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rolling my own blog engine, part 3 — CarlFurrow.com</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-21225</link>
		<dc:creator>Rolling my own blog engine, part 3 — CarlFurrow.com</dc:creator>
		<pubDate>Tue, 02 Jun 2009 02:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-21225</guid>
		<description>[...] A simplistic line of code, but it actually does quite a bit as we’ll soon find out.&#160; Now that we’ve told Fluent NHibernate Automapping how to find DTOs to map to database tables, we now would like to tell it what to do with them by defining some conventions.&#160; See James Gregory’s quick overview to the convention framework by visiting his blog. [...]</description>
		<content:encoded><![CDATA[<p>[...] A simplistic line of code, but it actually does quite a bit as we’ll soon find out.&#160; Now that we’ve told Fluent NHibernate Automapping how to find DTOs to map to database tables, we now would like to tell it what to do with them by defining some conventions.&#160; See James Gregory’s quick overview to the convention framework by visiting his blog. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Gregory</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-17526</link>
		<dc:creator>James Gregory</dc:creator>
		<pubDate>Mon, 30 Mar 2009 16:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-17526</guid>
		<description>Hi Mark, sorry but your comment got stuck in comment-limbo. Your points are great and those two conventions should be included in the Wiki. I&#039;d recommend you pop by the &lt;a href=&quot;http://groups.google.com/group/fluent-nhibernate&quot; rel=&quot;nofollow&quot;&gt;mailing list&lt;/a&gt; if you&#039;re in need of any help.</description>
		<content:encoded><![CDATA[<p>Hi Mark, sorry but your comment got stuck in comment-limbo. Your points are great and those two conventions should be included in the Wiki. I&#8217;d recommend you pop by the <a href="http://groups.google.com/group/fluent-nhibernate" rel="nofollow">mailing list</a> if you&#8217;re in need of any help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-17229</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 24 Mar 2009 12:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-17229</guid>
		<description>Hi - I agree with the convention changes and feel this is definitely a step in the right direction.
I am only just starting to use FluentNhibernate and only just got to grips with the previous conventions though and how these were implemented. To get me on the right track could you advise how the following would be implemented using the above technique: 

.WithConventions(c =&gt;
{

c.GetForeignKeyName = type =&gt; type.Name + &quot;Id&quot;;
c.GetForeignKeyNameOfParent = type =&gt; type.Name + &quot;Id&quot;;})

I know you have to use the IHasManyCollection but not sure the best way to approach it - I know it is probably very simple but any help appreciated. This would probably be useful as another example in Wiki as it a commonly used convention and its not initially obvious how to use the new conventions to acheive this. Great project by the way..</description>
		<content:encoded><![CDATA[<p>Hi &#8211; I agree with the convention changes and feel this is definitely a step in the right direction.<br />
I am only just starting to use FluentNhibernate and only just got to grips with the previous conventions though and how these were implemented. To get me on the right track could you advise how the following would be implemented using the above technique: </p>
<p>.WithConventions(c =&gt;<br />
{</p>
<p>c.GetForeignKeyName = type =&gt; type.Name + &#8220;Id&#8221;;<br />
c.GetForeignKeyNameOfParent = type =&gt; type.Name + &#8220;Id&#8221;;})</p>
<p>I know you have to use the IHasManyCollection but not sure the best way to approach it &#8211; I know it is probably very simple but any help appreciated. This would probably be useful as another example in Wiki as it a commonly used convention and its not initially obvious how to use the new conventions to acheive this. Great project by the way..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Gregory</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-16996</link>
		<dc:creator>James Gregory</dc:creator>
		<pubDate>Mon, 16 Mar 2009 08:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-16996</guid>
		<description>Hey Peter, I&#039;m very flattered you think I&#039;ve got a book in me; once the code-base stabilises and we start catching up to hbm.xml in features then I&#039;d certainly be open to the possibility. We&#039;ll see what the future holds.</description>
		<content:encoded><![CDATA[<p>Hey Peter, I&#8217;m very flattered you think I&#8217;ve got a book in me; once the code-base stabilises and we start catching up to hbm.xml in features then I&#8217;d certainly be open to the possibility. We&#8217;ll see what the future holds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Bromberg</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-16989</link>
		<dc:creator>Peter Bromberg</dc:creator>
		<pubDate>Mon, 16 Mar 2009 01:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-16989</guid>
		<description>James: It&#039;s time for a book. Manning would probably be interested. Get a co-author if needed. Get the code baked, write the book! I&#039;ll be the first to buy it and write a review on our site. You have the skills and your writing style is perfect for this. How about it?</description>
		<content:encoded><![CDATA[<p>James: It&#8217;s time for a book. Manning would probably be interested. Get a co-author if needed. Get the code baked, write the book! I&#8217;ll be the first to buy it and write a review on our site. You have the skills and your writing style is perfect for this. How about it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Scheirman</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-16912</link>
		<dc:creator>Ben Scheirman</dc:creator>
		<pubDate>Fri, 13 Mar 2009 11:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-16912</guid>
		<description>Man, this is a LOT better.  Well done, James!</description>
		<content:encoded><![CDATA[<p>Man, this is a LOT better.  Well done, James!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Gregory</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-16881</link>
		<dc:creator>James Gregory</dc:creator>
		<pubDate>Thu, 12 Mar 2009 09:37:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-16881</guid>
		<description>Thanks Harry, corrected. Take a look at the &lt;a href=&quot;http://wiki.fluentnhibernate.org/show/ConventionsShortcuts&quot; rel=&quot;nofollow&quot;&gt;conventions shortcuts&lt;/a&gt; which uses an underlying delegate convention.</description>
		<content:encoded><![CDATA[<p>Thanks Harry, corrected. Take a look at the <a href="http://wiki.fluentnhibernate.org/show/ConventionsShortcuts" rel="nofollow">conventions shortcuts</a> which uses an underlying delegate convention.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry M</title>
		<link>http://jagregory.com/writings/fluent-nhibernate-conventions-rewrite/comment-page-1/#comment-16880</link>
		<dc:creator>Harry M</dc:creator>
		<pubDate>Thu, 12 Mar 2009 09:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=276#comment-16880</guid>
		<description>James, you ahve a typo
 public bool Apply(IClassMap classMap)
  {
    // will produce table names like: tbl_Customer, tbl_Product
    classMap.WithTable(&quot;tbl_&quot; + classMap.EntityType.Name);
  }

wither this method is meant to be void or its missing a return value.

Why not create a DelegateConvention like

public class DelegateConvention : IClassConvention
{
  public DelegateConvention(Func accept, Action action){...}
 ...
}</description>
		<content:encoded><![CDATA[<p>James, you ahve a typo<br />
 public bool Apply(IClassMap classMap)<br />
  {<br />
    // will produce table names like: tbl_Customer, tbl_Product<br />
    classMap.WithTable(&#8220;tbl_&#8221; + classMap.EntityType.Name);<br />
  }</p>
<p>wither this method is meant to be void or its missing a return value.</p>
<p>Why not create a DelegateConvention like</p>
<p>public class DelegateConvention : IClassConvention<br />
{<br />
  public DelegateConvention(Func accept, Action action){&#8230;}<br />
 &#8230;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
