Transaction Attribute for your class
We discussed that for our class to participate in transactions we need to do certain things... Now we will talk about what those certain things have to be...
One of the things that you need to do is to apply Transaction attribute to your class... You would apply it just before your class declaration... It would look something like:
[Transaction(TransactionOption.Supported)]
Now if you are familiar with COM+ transactions then TransactionOption has values which are very similar to COM+ transaction options...
The TransactionOption values can be Disabled, NotSupported, Supported, Required, RequiresNew... Out of these Required is the default...
No comments:
Post a Comment