I have a function that does an update and it also calls child updates. I am forcing an error on a child to see if everything rollsback and it is not. all i have is this: [Transactional(TransactionalTypes.TransactionScope)] at my root save method. Is there something else I need?
[Transactional(TransactionalTypes.TransactionScope)]
public void SaveObject(GLEventInfo origObject)
{
thanks, I did just that, but it doesn't appear to roll back my data that saves successfully.
[Transactional(TransactionalTypes.TransactionScope)]
protected override void DataPortal_Update()
{
ValidationRules.CheckRules();
SomeObject origObject = this.m_origObject;
using (DAL.FServicesData service = new DAL.FServicesData())
{
service.SaveEvent(this);
History.Save(); // forced Error happens in here
}
}
}
public GLHistoryList History
{
get
{
CanReadProperty("History", true);
return m_history;
}
}
protected override void DataPortal_Update()
{
this.RaiseListChangedEvents = true;
Child_Update();
this.RaiseListChangedEvents = false;
}
private void Child_Insert()
{
DAL.FinancialServicesData.AddGLHistoryEvent(this);
}
Copyright (c) Marimer LLC