Henry -

Thanks for answering.

The versions that I am using are:
Castle.Services.Transaction: 2.5.0.0
Castle.Facilities.AutoTx: 2.5.1.0
Castle.Facilities.NHibernateIntegration: 1.1.0.39

Is the reason that putting the Transactional/Transaction attributes on
a controller is that the purpose of the Controller is to ultimately
pass a model to a view by returning the Action Result?

So, do you put the Attributes on Service Classes? What about the
Repository?

Thanks Again.

Chuck

On Jul 18, 2:41 pm, Henry Conceição <[email protected]> wrote:
> Which version are you using? Did you marked the class as
> transactional?
>
> And btw, usually it's a bad ideia to have the controller as a
> transaction boundary.
>
> On Jul 16, 11:40 am, Chuck <[email protected]> wrote:
>
>
>
>
>
>
>
> > I am trying to use the CFN plus ATM. I thought I had everything set
> > up, but I am not getting Transaction support and could use any
> > pointers given.
>
> > In my Persistence Installer, I am calling:
>
> > container.AddFacility<TransactionFacility>();
>
> > container.AddFacility<NHibernateFacility>("nhibernatefacility.1",
> >                                                                          f 
> > =>
>
> > f.ConfigurationBuilder<FluentNHibernateConfigurationBuilder>().IsWeb());
>
> > I am trying to start a transaction from my Controller:
> > [Transactional]
> > public class PersonController : Controller
>
> > ...
>
> > [HttpPost]
> > [Transaction]
> > public virtual ActionResult Edit(int id, Person person)
> > {
> >         try
> >         {
> >                 var originalPerson = _repository.FindById<Person>(id);
> >                 originalPerson.FirstName = person.FirstName;
> >                 originalPerson.LastName = person.LastName;
> >                 _repository.Save(originalPerson);
> >                 return RedirectToAction("Index");
> >         }
> >         catch
> >         {
> >                 return View();
> >         }
>
> > }
>
> > Any Ideas?
>
> > Chuck

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to