Hi I have a generator which made some automated code (creating all the get, set, etc) for me structured by a Database, in this code there is a piece of code that is as follows:
SqlTransaction transaction = TransactionManager.GetTransaction();
I have added the reference and imported using System.Transactions;
at the beginning of the file manually because the code generator never did this. Once imported, this removed the TransactionManager error
I was getting but now I am receiving an error on .GetTransaction();
from what I have researched there is no such method in the TransactionManager
.
Does anyone have any clue as to what should be in place of this code (the generator has some code which has to be replaced due to errors, my guess is this is one of those cases...). Any suggestions would be appreciated! Thanks in advance!