<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>S#arp Architecture:  ASP.NET MVC with NHibernate</title><link>http://www.codeplex.com/SharpArchitecture/Project/ProjectRss.aspx</link><description>Pronounced &amp;#34;Sharp Architecture,&amp;#34; this is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advant...</description><item><title>New Post: S#arp Architecture Compatibility</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=32669</link><description>&lt;div style="line-height: normal;"&gt;Thanks Billy. I got it working that way, though like I said, still had this strage reference to a .NET 3.5 library. Still not sure where it's coming from, but I'll post if I figure it out.&lt;br&gt;
D
&lt;/div&gt;</description><author>ddonovan</author><pubDate>Tue, 19 Aug 2008 14:28:15 GMT</pubDate><guid isPermaLink="false">New Post: S#arp Architecture Compatibility 20080819022815P</guid></item><item><title>New Post: S#arp Architecture Compatibility</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=32669</link><description>&lt;div style="line-height: normal;"&gt;Almost everything should work in VS2005 except the web layer and any LINQ stuff.&amp;nbsp; Accordingly, you should create a new web layer within VS2005 and go from there.&lt;br&gt;
&lt;br&gt;
Billy&lt;br&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Mon, 18 Aug 2008 13:23:43 GMT</pubDate><guid isPermaLink="false">New Post: S#arp Architecture Compatibility 20080818012343P</guid></item><item><title>New Post: Backup and Recovery Best Practices for Microsoft SQL Server 2005</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33539</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Some free IT magazines I found from net. Worth checking it.&lt;/p&gt;
&lt;p&gt;Backup and Recovery Best Practices for Microsoft SQL Server 2005&lt;br&gt;
&lt;a href="http://softwareqatestings.tradepub.com/free/w_hp20"&gt;http://softwareqatestings.tradepub.com/free/w_hp20&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Essential Guide to Solving Server Sprawl&lt;br&gt;
&lt;a href="http://softwareqatestings.tradepub.com/free/w_hp21"&gt;http://softwareqatestings.tradepub.com/free/w_hp21&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Optimizing HP Servers with Microsoft SQL Server 2008&lt;br&gt;
&lt;a href="http://softwareqatestings.tradepub.com/free/w_hp22"&gt;http://softwareqatestings.tradepub.com/free/w_hp22&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;enjoy&lt;br&gt;
Cool&lt;/p&gt;
&lt;/div&gt;</description><author>cool7575</author><pubDate>Thu, 14 Aug 2008 16:47:44 GMT</pubDate><guid isPermaLink="false">New Post: Backup and Recovery Best Practices for Microsoft SQL Server 2005 20080814044744P</guid></item><item><title>New Post: S#arp Architecture Compatibility</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=32669</link><description>&lt;div style="line-height: normal;"&gt;I'm also trying to use this with VS 2005... I'd like to the the ProjectBase classes (specifically PersistentObject) as a base class for my domain objects in an existing VS 2005 project. Are there any workarounds? It seemed to be working until I tried to build on a clean box (without .NET 3.5 installed), then I&amp;nbsp;ended up with a reference to System.Core version 3.5.0.0 in my&amp;nbsp;web.config file. Any idea why this would be? All the References in ProjectBase were build to .NET 2.0 (or so VS says)... any help would be appreciated!&lt;br&gt;
Thanks,&lt;br&gt;
Dan&lt;br&gt;
PS - Awesome stuff...
&lt;/div&gt;</description><author>ddonovan</author><pubDate>Thu, 14 Aug 2008 05:38:01 GMT</pubDate><guid isPermaLink="false">New Post: S#arp Architecture Compatibility 20080814053801A</guid></item><item><title>New Post: Anyone successfully using BindingHelperExtensions.UpdateFrom?</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33148</link><description>&lt;div style="line-height: normal;"&gt;Hi Billy,&lt;br&gt;
&lt;br&gt;
Thanks for the detailed reply! &lt;br&gt;
&lt;br&gt;
I like the explicitness of the &amp;quot;WithTypedId&amp;lt;int&amp;gt;&amp;quot; suffix. Plus I'm still waffling on changing to Guid IDs.&lt;br&gt;
&lt;br&gt;
You're absolutely right, when I set lazy=&amp;quot;false&amp;quot;, the object is no longer a proxy and the UpdateFrom works fine.&lt;br&gt;
&lt;br&gt;
I haven't tried the Get() method yet. That may come in handy as I expect that I may _want_ to lazy load on occasion (e.g. data in tabbed controls), but not always.&lt;br&gt;
&lt;br&gt;
The property-peek trick doesn't seem to work. Following in the debugger, I see that referencing a property does call the empty constructor on my POCO object. Does that mean NHibernate is pulling the data? In any case, it's not getting updated by UpdateFrom--perhaps because it is still proxied, even though the data is loaded? I guess I need to install SQL Profiler to follow what is really happening.&lt;br&gt;
&lt;br&gt;
Thanks again for your help,&lt;br&gt;
&lt;br&gt;
Mark &lt;br&gt;
&lt;/div&gt;</description><author>mcbsys</author><pubDate>Sat, 09 Aug 2008 02:14:20 GMT</pubDate><guid isPermaLink="false">New Post: Anyone successfully using BindingHelperExtensions.UpdateFrom? 20080809021420A</guid></item><item><title>New Post: Anyone successfully using BindingHelperExtensions.UpdateFrom?</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33148</link><description>&lt;div style="line-height: normal;"&gt;Hi Mark,&lt;br&gt;
&lt;br&gt;
Before discussing the BindingHelperExtensions, please don't that you don't need to inherit from PersistentObjectWithTypedID&amp;lt;int&amp;gt;; just inherit from PersistentObject which has a default ID type of int.&lt;br&gt;
&lt;br&gt;
As for your question, based on how you described it, I assume you are doing the following in this order:&lt;br&gt;
&lt;ol&gt;
    &lt;li&gt;In the controller action which the form submitted to, you are using a DAO to load the object from the DB.&lt;/li&gt;
    &lt;li&gt;You're using UpdateFrom to then update the item loaded from the DB with values from the field.&lt;/li&gt;
    &lt;li&gt;You're encountering the above referenced error.&lt;/li&gt;
&lt;/ol&gt;
The reason that this is occurring is that, by default, NHibernate lazily loads objects.&amp;nbsp; For example, assume you load a customer from the DB; NHibernate doesn't take the time to talk to the database and return data until you reference one of the properties or methods on the customer object.&amp;nbsp; To facilitate this, NHibernate gives you a proxy object that tells NHibernate when it's time to actually hit the database.&amp;nbsp; That's where Castle comes into play; NHibernate uses the &lt;a href="http://www.castleproject.org/dynamicproxy/index.html"&gt;Castle Proxy project&lt;/a&gt; to facilitate proxying.&amp;nbsp; (To learn more about proxy objects with NHibernate, read http://www.hibernate.org/hib_docs/nhibernate/html/performance.html#performance-proxies .)&amp;nbsp; Since UpdateFrom is using reflection to update the object's values, it's not kicking off the proxy's &amp;quot;time to talk to the database and load the real object&amp;quot; trigger.&amp;nbsp; You have two options:&lt;br&gt;
&lt;ul&gt;
    &lt;li&gt;Add lazy=&amp;quot;false&amp;quot; to the opening class tag within the object's HBM
    file.&amp;nbsp; This will ensure that the object is not loaded lazily and will
    not give you an intermediary proxy.&lt;/li&gt;
    &lt;li&gt;Load the object from the database using NHibernate's Find()
    method.&amp;nbsp; This method will never return a proxied object.&amp;nbsp; I'll be sure
    to add this method to the generic DAO...but feel free to do so to your
    own code in the meantime.&lt;/li&gt;
    &lt;li&gt;Look at one of the properties or invoke a method on the object before your call to UpdateFrom.&amp;nbsp; This will force NHibernate to replace the proxy with the actual object loaded from the database.&amp;nbsp; (Not a very elegant solution.)&lt;/li&gt;
&lt;/ul&gt;
The first and second options are a bit cleaner; and as a nice side-effect, you won't have to add &amp;quot;virtual&amp;quot; before that object's properties and methods if you set lazy=&amp;quot;false&amp;quot; in the class declaration.&lt;br&gt;
&lt;br&gt;
BTW, the S#arp Architecture discussion group has moved to http://groups.google.com/group/sharp-architecture ...please request a membership and I'll approve it immediately.&lt;br&gt;
&lt;br&gt;
Billy McCafferty&lt;br&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Fri, 08 Aug 2008 23:19:22 GMT</pubDate><guid isPermaLink="false">New Post: Anyone successfully using BindingHelperExtensions.UpdateFrom? 20080808111922P</guid></item><item><title>New Post: Discussion Group for S#arp Arch now at Google Groups...</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33204</link><description>&lt;div style="line-height: normal;"&gt;http://groups.google.com/group/sharp-architecture&lt;br&gt;
&lt;br&gt;
Billy McCafferty&lt;br&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Fri, 08 Aug 2008 21:36:25 GMT</pubDate><guid isPermaLink="false">New Post: Discussion Group for S#arp Arch now at Google Groups... 20080808093625P</guid></item><item><title>Updated Wiki: Home</title><link>http://www.codeplex.com/SharpArchitecture/Wiki/View.aspx?title=Home&amp;version=9</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
S#arp Architecture has moved...
&lt;/h1&gt; &lt;br /&gt;To facilitate better integration with SVN clients, S#arp Architecture has been moved to Google Code at &lt;a href="http://code.google.com/p/sharp-architecture" class="externalLink"&gt;http://code.google.com/p/sharp-architecture&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.  Additionally, a discussion group has just been setup on Google Groups at &lt;a href="http://groups.google.com/group/sharp-architecture" class="externalLink"&gt;http://groups.google.com/group/sharp-architecture&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to support use of the architecture, discuss the ideas and patterns behind it, offer suggestions for improvement, and exchange ideas for using it in real-world applications.&lt;br /&gt; &lt;br /&gt;No further releases will be made at this location.&lt;br /&gt; &lt;br /&gt;Billy McCafferty&lt;br /&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Fri, 08 Aug 2008 21:34:23 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20080808093423P</guid></item><item><title>Updated Wiki: Home</title><link>http://www.codeplex.com/SharpArchitecture/Wiki/View.aspx?title=Home&amp;version=8</link><description>&lt;div class="wikidoc"&gt;
To facilitate better integration with SVN clients, S#arp Architecture has been moved to Google Code at &lt;a href="http://code.google.com/p/sharp-architecture" class="externalLink"&gt;http://code.google.com/p/sharp-architecture&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.  Additionally, a discussion group has just been setup on Google Groups at &lt;a href="http://groups.google.com/group/sharp-architecture" class="externalLink"&gt;http://groups.google.com/group/sharp-architecture&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; to support use of the architecture, discuss the ideas and patterns behind it, offer suggestions for improvement, and exchange ideas for using it in real-world applications.&lt;br /&gt; &lt;br /&gt;No further releases will be made at this location.&lt;br /&gt; &lt;br /&gt;Billy McCafferty&lt;br /&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Fri, 08 Aug 2008 21:33:11 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20080808093311P</guid></item><item><title>Updated Wiki: Home</title><link>http://www.codeplex.com/SharpArchitecture/Wiki/View.aspx?title=Home&amp;version=7</link><description>&lt;div class="wikidoc"&gt;
To facilitate better integration with SVN clients, S&amp;#35;arp Architecture has been moved to Google Code at http&amp;#58;&amp;#47;&amp;#47;code.google.com&amp;#47;p&amp;#47;sharp-architecture.  Additionally, a discussion group has just been setup on Google Groups at http&amp;#58;&amp;#47;&amp;#47;groups.google.com&amp;#47;group&amp;#47;sharp-architecture to support use of the architecture, discuss the ideas and patterns behind it, offer suggestions for improvement, and exchange ideas for using it in real-world applications.&lt;br /&gt;&lt;br /&gt;No further releases will be made at this location.&lt;br /&gt;&lt;br /&gt;Billy McCafferty
&lt;br /&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Fri, 08 Aug 2008 21:31:05 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20080808093105P</guid></item><item><title>Commented Issue: CLS compliance</title><link>http://www.codeplex.com/SharpArchitecture/WorkItem/View.aspx?WorkItemId=5281</link><description>Making all ProjectBase assemblies CLSCompliant would help to avoid some warnings in my solution. Plus, having those published and shared assemblies CLSCompliant helps code quality a bit.&lt;br /&gt;Comments: ** Comment from web user: hangy ** &lt;p&gt;Might be good to add &amp;#91;assembly&amp;#58; CLSCompliant&amp;#40;true&amp;#41;&amp;#93; to each AssemblyInfo.cs. &amp;#58;&amp;#41;&lt;/p&gt;</description><author>hangy</author><pubDate>Fri, 08 Aug 2008 08:49:56 GMT</pubDate><guid isPermaLink="false">Commented Issue: CLS compliance 20080808084956A</guid></item><item><title>New Post: Anyone successfully using BindingHelperExtensions.UpdateFrom?</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33148</link><description>&lt;div style="line-height: normal;"&gt;I've got a little project set up with S#arpArchitecture 0.7.3. I'm trying to use System.Web.Mvc.BindingHelperExtensions.UpdateFrom to copy fields from a form into my object, which is a PersistentObjectWithTypedID&amp;lt;int&amp;gt;. Here's a post on how that is supposed to work:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://weblogs.asp.net/fredriknormen/archive/2008/03/13/asp-net-mvc-framework-2-the-bindinghelper-class-ui-mapper.aspx"&gt;http://weblogs.asp.net/fredriknormen/archive/2008/03/13/asp-net-mvc-framework-2-the-bindinghelper-class-ui-mapper.aspx&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
In my project, nothing is happening:&amp;nbsp; no data is copied. &lt;br&gt;
&lt;br&gt;
I see in the debugger that my object is a proxy using Castle.Core.Interceptor.IInterceptor. (I didn't know this framework used Castle!) There's also a reference to NHibernate.Proxy.Poco.Castle.CastleLazyInitializer. Is this proxy preventing UpdateFrom from mapping the fields between the form and the object? Is there some way to get it to work? Manually typing hundreds of field mappings over and over again is one thing I hoped to avoid with an ORM!&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Mark&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;</description><author>mcbsys</author><pubDate>Fri, 08 Aug 2008 00:39:20 GMT</pubDate><guid isPermaLink="false">New Post: Anyone successfully using BindingHelperExtensions.UpdateFrom? 20080808123920A</guid></item><item><title>New Post: Moved to Google Code</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33005</link><description>&lt;div style="line-height: normal;"&gt;Google code allows you to connect directly via a SVN client without having to have an intermediary bridge service running.&amp;nbsp; This is helpful when setting up a continuous integration env't.&lt;br&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Thu, 07 Aug 2008 17:14:22 GMT</pubDate><guid isPermaLink="false">New Post: Moved to Google Code 20080807051422P</guid></item><item><title>New Post: Moved to Google Code</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33005</link><description>&lt;div style="line-height: normal;"&gt;Why did you move to Google code? Just wondering if there are any benefits.
&lt;/div&gt;</description><author>raidevnet</author><pubDate>Thu, 07 Aug 2008 16:19:29 GMT</pubDate><guid isPermaLink="false">New Post: Moved to Google Code 20080807041929P</guid></item><item><title>New Post: The Source </title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=32484</link><description>&lt;div style="line-height: normal;"&gt;Source is now located at http://code.google.com/p/sharp-architecture/&lt;br&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Wed, 06 Aug 2008 14:52:42 GMT</pubDate><guid isPermaLink="false">New Post: The Source  20080806025242P</guid></item><item><title>New Post: Moved to Google Code</title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=33005</link><description>&lt;div style="line-height: normal;"&gt;New location is http://code.google.com/p/sharp-architecture/&lt;br&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Wed, 06 Aug 2008 14:50:53 GMT</pubDate><guid isPermaLink="false">New Post: Moved to Google Code 20080806025053P</guid></item><item><title>New Post: The Source </title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=32484</link><description>&lt;div style="line-height: normal;"&gt;Hi simone_b,&lt;br&gt;
&lt;br&gt;
All source is currently provided in the release download; I'll move to Google code soon.&lt;br&gt;
&lt;/div&gt;</description><author>wmccafferty</author><pubDate>Wed, 06 Aug 2008 13:44:07 GMT</pubDate><guid isPermaLink="false">New Post: The Source  20080806014407P</guid></item><item><title>New Post: The Source </title><link>http://www.codeplex.com/SharpArchitecture/Thread/View.aspx?ThreadId=32484</link><description>&lt;div style="line-height: normal;"&gt;Source please.&lt;br&gt;
&lt;/div&gt;</description><author>simone_b</author><pubDate>Wed, 06 Aug 2008 07:40:22 GMT</pubDate><guid isPermaLink="false">New Post: The Source  20080806074022A</guid></item><item><title>Updated Release: Version 0.7.3 with MVC Preview 4 and NH 2.0 CR1 (Aug 05, 2008)</title><link>http://www.codeplex.com/SharpArchitecture/Release/ProjectReleases.aspx?ReleaseId=16004</link><description>&lt;div&gt;
The transition from MVC Preview 3 to Preview 4 is a very simple process, as was the upgrade from NH 2.0 Beta 1 to the CR1.  Besides these, and the inclusion of the latest MVC Contrib 0.0.1.123 Beta, no other dependency changes were made to the source.&lt;br&gt; &lt;br&gt;The home page now lists links to the various pages in the sample application and the documentation has been updated to describe running S#arp Architecture in a Medium Trust environment and elaborates a bit on (custom) collection best practices.&lt;br&gt;
&lt;/div&gt;</description><author></author><pubDate>Tue, 05 Aug 2008 13:00:07 GMT</pubDate><guid isPermaLink="false">Updated Release: Version 0.7.3 with MVC Preview 4 and NH 2.0 CR1 (Aug 05, 2008) 20080805010007P</guid></item><item><title>Released: Version 0.7.3 with MVC Preview 4 and NH 2.0 CR1 (Aug 05, 2008)</title><link>http://www.codeplex.com/SharpArchitecture/Release/ProjectReleases.aspx?ReleaseId=16004</link><description>&lt;div&gt;
The transition from MVC Preview 3 to Preview 4 is a very simple process, as was the upgrade from NH 2.0 Beta 1 to the CR1.  No other dependency changes were made to the source.  The home page now lists links to the various pages in the sample application and the documentation has been updated to describe running S#arp Architecture in a Medium Trust environment and elaborates a bit on (custom) collection best practices.&lt;br&gt;
&lt;/div&gt;</description><author></author><pubDate>Tue, 05 Aug 2008 12:58:43 GMT</pubDate><guid isPermaLink="false">Released: Version 0.7.3 with MVC Preview 4 and NH 2.0 CR1 (Aug 05, 2008) 20080805125843P</guid></item></channel></rss>