CommandBase and TransactionalTypes...

CommandBase and TransactionalTypes...

Old forum URL: forums.lhotka.net/forums/t/1160.aspx


guyroch posted on Thursday, September 07, 2006

I want to set the [Transactional(TransactionalTypes.Manual)] attribute on a CommandBase object. 

Now, on a normal DataPortal_Update command I would do this...

[Transactional(TransactionalTypes.Manual)]
private void DataPortal_Update()
{
   ...
}

So, for the CommandBase object would I simply add the attribute at the class definition or at the DataPortal_Execute() method override.  I'm 99% sure that it need to be at the DataPortal_Execute() method override but just though I check first.

[Transactional(TransactionalTypes.Manual)]  // THIS
private class UnlockCommand : CommandBase
{
   ...

   [Transactional(TransactionalTypes.Manual)]  // OR THIS
   protected override void DataPortal_Execute()
   {
      ...
   }
}

 

 

ajj3085 replied on Friday, September 08, 2006

Put it on the DP method.

Copyright (c) Marimer LLC