Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make inheritance of data portal operation attributes optional #4616

Open
rockfordlhotka opened this issue Mar 28, 2025 · 0 comments
Open

Make inheritance of data portal operation attributes optional #4616

rockfordlhotka opened this issue Mar 28, 2025 · 0 comments

Comments

@rockfordlhotka
Copy link
Member

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant