﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Rory, that is something that comes from NHibernate Query Generator
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment14</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment14</guid><pubDate>Thu, 28 Jun 2007 10:56:05 GMT</pubDate></item><item><title>Rory Fitzpatrick commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>I'm going to ask another beginner question here - where does...
  
  
 Where.Person.EmployedSince &gt;= new DateTime(2000,1,1),
  
OrderBy.Person.Name.EmployedSince.Desc
  
  
...come from?
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment13</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment13</guid><pubDate>Thu, 28 Jun 2007 10:52:16 GMT</pubDate></item><item><title>Darrell Young commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>I really like the Repository&lt;T&gt; - I have question about extending IRepository&lt;T&gt; and adding custom methods to it - how would you do this using Rhino.Commons? 
  
  
Thanks
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment12</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment12</guid><pubDate>Tue, 12 Jun 2007 01:39:13 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Syntax:
  
  
Repository&lt;Person&gt;.FindAll(
  
   Where.Person.EmployedSince &gt;= new DateTime(2000,1,1),
  
  OrderBy.Person.Name.EmployedSince.Desc
  
)
  
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment11</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment11</guid><pubDate>Sun, 10 Jun 2007 16:23:39 GMT</pubDate></item><item><title>Tim Scott commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Wow, this is awesome.  Thanks for sharing this.  I am just starting a project that is in progress, and I hope they're not too far along for me to introduce this.  
  
  
After a quick look at the code I have a question.   I notice a couple of that you pass both DetachedCriteria and Order[], for example:
  
  
ICollection&lt;T&gt; FindAll(DetachedCriteria criteria, params Order[] orders)
  
  
Why have the Orders[] parameter?  Detached criteria itself encapsulates orders.  This could cause maintainability issues.  For example, a developer sees this...
  
  
Repository&lt;Person&gt;.FindAdd(detCriteria, new Order(new Order(Order.Desc("FullName"))
  
  
...and assumes that the result would be sorted descending by full name.  However, only after some painful sleuthing, he might discover that detCriteria has already has some orders.  He would discover that the creator of the criteria and the repository are thus coupled.
  
  
I know, I know, you're accepting patches, but I guess this would be breaking change.
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment10</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment10</guid><pubDate>Sun, 10 Jun 2007 16:11:48 GMT</pubDate></item><item><title>Chris Bilson commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Sorry...I see you have more posts on Repository&lt;T&gt; and DDD from the past few days I haven't caught up with yet. Sorry for asking a question you have already answered!
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment9</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment9</guid><pubDate>Sun, 10 Jun 2007 07:50:27 GMT</pubDate></item><item><title>Chris Bilson commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Thanks for the explanation and the code Ayende. Awesome stuff.
  
  
One question: do have an example somewhere of making specialized repositories? Do you still use Repository&lt;T&gt;? Do you have a really slick way you do this? 
  
  
Please, if you have time and energy, post more like this - i.e. more about stuff in rhino-commons, how it works, etc. I've been surprised at how easy it is to figure out but I'd like to hear/read more, since the sample applications in rhino-commons don't even scratch the surface.
  
  
Thanks again!
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment8</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment8</guid><pubDate>Sun, 10 Jun 2007 07:42:30 GMT</pubDate></item><item><title>Quicoli commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Really thank you for explanation.
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment7</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment7</guid><pubDate>Sat, 09 Jun 2007 21:16:32 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>I have Windsor WCF integration kit that I am preparing to release.
  
If you can wait a few days, I'll have it out.
  
It also handles the Unit Of Work stuff.
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment6</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment6</guid><pubDate>Fri, 08 Jun 2007 08:35:36 GMT</pubDate></item><item><title>Christian KLAT commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>I've been trying to migrate your code to make it work in a WCF Scenario instead of the HttpApplication one. I've implemented the DI for WCF.
  
  
I've been trying to Manage the UnitOfWork creation in a custom ServiceHostFactory implementation but it doesn't work.
  
  
Here are my questions :) :
  
  
1) Where do you think i should Initialize the Castle Container in a WCF Scenario.
  
  
2) What would be the best place to handle the WCF Service Lifecycle and be able to insure that the UnitOfWork and NHibernate initialization are handled properly.
  
  
I have the source code of what i've done so far but i would really mess up the post... If you're interested i can email it to you. 
  
  
Regards,
  
  
Chrsitian
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment5</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment5</guid><pubDate>Fri, 08 Jun 2007 08:34:01 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Robert,
  
I am accepting patches :-)
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment4</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment4</guid><pubDate>Fri, 08 Jun 2007 08:20:14 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>@Sheraz,
  
There is a refferer checks that blocks you, try copy/paste the link
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment3</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment3</guid><pubDate>Fri, 08 Jun 2007 08:19:18 GMT</pubDate></item><item><title>Robert Mircea commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Is it possible to make initialization of IUnitOfWorkFactory more XML config friendly? At the moment, you are using boo which seems to have a natural syntax for this kind of stuff, but configuring IUnitOfWorkFactory from XML is almost impossible due to this kind of declaration (in C#):
  
  
Assembly[] assemblies = new Assembly[]
  
            {
  
                Assembly.Load("MyAssembly1"),
  
                Assembly.Load("MyAssembly2")
  
            };
  
  
Hashtable props = new Hashtable();
  
            props.Add("assemblies", assemblies);
  
            Container.AddComponent("active_record_unit_of_work", typeof(IUnitOfWorkFactory), typeof(ActiveRecordUnitOfWorkFactory));
  
            Container.Resolve&lt;IUnitOfWorkFactory&gt;(props);
  
  
Maybe creating an overloaded constructor in which you can specify assemblies names as an array of string will allow to use Castle's XML config initialization.
  
  
Regards,
  
Robert
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment2</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment2</guid><pubDate>Fri, 08 Jun 2007 07:38:30 GMT</pubDate></item><item><title>Sheraz commented on Rhino Commons, Repository&lt;T&gt; and Unit Of Work</title><description>Rahien, 
  
    Seems like the application link is broken
</description><link>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment1</link><guid>http://ayende.com/2527/rhino-commons-repository-t-and-unit-of-work#comment1</guid><pubDate>Fri, 08 Jun 2007 06:47:50 GMT</pubDate></item></channel></rss>