Automatic transaction!!!

Automatic transaction!!!

Anonymous
Not applicable
917 Views
2 Replies
Message 1 of 3

Automatic transaction!!!

Anonymous
Not applicable

Hi,

I'm doing the DevTv sample tutorials.

in the second tutorial solution file, I noticed that there is no Automatic Transactions Attribute.

 

so how can I do the transactions after each modification I send to the application?!!

is there any other way to do this Automatically or even Manually?!!

 

 

here it is the code:

 

0 Likes
Accepted solutions (1)
918 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
Accepted solution

Please always research for a solution yourself before submitting a question here.

 

By the way, please also use exclamation points sparinglyIf you choose to use an exclamation point, use only one to convey excitement... “People sometimes get carried away and put a number of exclamation points at the end of their sentences. The result can appear too emotional or immature,” she writes. “Exclamation points should be used sparingly in writing.”

 

Automatic transactions were eliminated several years ago.

  

Here is an eight years old discussion recommending you to avoid using it:

  

https://thebuildingcoder.typepad.com/blog/2012/05/read-only-and-automatic-transaction-modes.html

  

Sorry that they still appear in the sample code you found. It is apparently outdated.

  

Here are several suggestions on how to manage manual transactions:

  

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.53

  

The simplest and most important recommendation is to keep it simple and encapsulate your manually managed transaction in a `using` statement:

  

https://thebuildingcoder.typepad.com/blog/2012/04/using-using-automagically-disposes-and-rolls-back....

  

I hope this helps.

 

Best regards,

 

Jeremy

 

 

 

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

Anonymous
Not applicable

Oh thanks a lot, Jeremy, those links are awesome,

also, accept my apology for posting a topic carelessly and reminding the etiquette rules for posting in a forum.

0 Likes