-
-
Notifications
You must be signed in to change notification settings - Fork 402
Open
Labels
Description
Make the change in #4090 be optional so people can get the old behavior.
Discussed in #4595
Originally posted by hoangcuongvn March 14, 2025
I upgrading my project that used Csla 8 to the new Csla 9. In Csla 8, all legacy DataPortal_XYZ and Child_XYZ methods are ignored. So in my project, many classes are declared like below and they worked fine as expected. But Csla 9 suddenly supports back those legacy methods and all my classes now crash. E.g if I call _portal.Execute()
- In Csla 8, the method
XCommandBase.execute()is invoked as expected - But in Csla 9, the method
DataPortal_Execute()is invoked => this causes the app works incorrectly.
Is it possible (e.g through configuration) to make Csla 9 not use those legacy methods?
public abstract XCommandBase<T>: CommandBase<T>
{
[Execute]
private Task execute()
{
return DataPortal_ExecuteAsync();
}
protected virtual void DataPortal_Execute()
{
throw new NotImplementedException(nameof(DataPortal_Execute));
}
protected virtual Task DataPortal_ExecuteAsync()
{
DataPortal_Execute();
return Task.CompletedTask;
}
}
```</div>