applied, thanks.
On Thu, Sep 25, 2008 at 4:43 PM, Mike Nichols <[EMAIL PROTECTED]>wrote:
>
> I fixed the patch to include the new file.
> @Jason - I knew that I could create the key as you showed but I wanted
> to do something like this:
> kernel.AddFacility("nh_uow", new NHibernateUnitOfWorkFacility(new
>
> NHibernateUnitOfWorkFacilityConfig(myAssembly).WithRepositoryKey("default_repository")));
>
> Since it is just adding a fluent method it doesn't add much to
> maintain but I think is more readable when using the Fluent
> registration in Castle and doesn't require knowledge on the underlying
> naming strategy in the ComponentRegistration interface.
>
> mike
>
> On Sep 25, 6:29 am, Jason Meckley <[EMAIL PROTECTED]> wrote:
> > convention over configuration. if you need the repository by key:
> > string key = typeof(NHRepository<Entity>).FullName;
> > IRepository<Entity> namedRepository =
> > IoC.Resolve<IRepository<Entity>>(key);
> >
> > Mike Nichols wrote:
> > > Sorry about that. I'll update it.
> > > Using the NH Unit of work facility doesn't let me pass in the key to
> > > be used for the IRepository. As a result, when I want to decorate
> > > IRepository with another, I don't have a great way to get they key for
> > > passing as a dependency into the other repository impl. I know that
> > > the default name is typically the implementation's name but I would
> > > rather not rely on that or require that kind of knowledge. The patch
> > > just lets me pass in the name of the repository I determine.
> > > I'll update as appropriate.
> >
> > > mike
> >
> > > On Sep 25, 3:07 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> > > > The patch is missing UnitOfWorkFacilities2,
> > > > It addition to that, can you explain what is the purpose of the
> patch? I
> > > > don't think that I follow your intention
> >
> > > > On Fri, Sep 19, 2008 at 9:14 PM, Mike Nichols <
> [EMAIL PROTECTED]>wrote:
> >
> > > > > I needed to key my IRepository implementations for easier
> decoration
> > > > > but wanted to use the UnitOfWorkFacilities (both varieties) so I
> > > > > implemented being able to pass the repository key into the
> facility.
> >
> > > > > The patch is 'NamedUnitOfWorkFacilityRepositoriesWithTests' and
> > > > > uploaded to this group list.
> >
> > > > > Please see tests for usage or let me know what you think.
> >
> > > > > Thanks
> > > > > Mike
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---