Master-Child transactionsMaster-Child transactions
Old forum URL: forums.lhotka.net/forums/t/8168.aspx
alagesan posted on Tuesday, December 15, 2009
[Transactional(TransactionalTypes.TransactionScope)]
protected override void DataPortal_Insert()
{
using (SafeDataReader reader =CustomerInvoiceHeaderInsert(
ReadProperty(_CustomerCollectionTermID),
ReadProperty(_FactoringAddressBookID)))
{
if (reader.Read())
{
LoadProperty(_HeaderID, reader.GetInt32("HeaderID"));
}
}
FieldManager.UpdateChildren(this);
}
hi.,
iam using above code for save master-child class with transactions
i want to be if both master and child saved then i want commit transaction
otherwise i want rollback transaction
but its not working above code
i follow code smith generator code
rxelizondo replied on Tuesday, December 15, 2009
Never used the code smith generator tool so I am not sure what exactly is going on with your code, but can you be more specific on what type of issue you are having? Are you getting an error? are the changes not being rolled back in case of an error?
alagesan replied on Wednesday, December 16, 2009
hi.,
here changes are not being rolled back if an error occur.
Copyright (c) Marimer LLC