How does the ExecuteAttribute work #3738
Answered
by
rockfordlhotka
StefanOssendorf
asked this question in
Questions
-
Hi. How exactly is the class FooCommand : CommandBase<FooCommand> {
[Create]
private void Create(...) { ... }
[Execute]
private void Execute() { .... }
} According to the new CSLA8 eBook it should also be possible (this works with CommandBase<> and the current pre-release) [Serializable]
public class Bar : ReadOnlyBase<Bar> {
[Execute]
private void Execute(string name) {
Console.WriteLine(name);
}
} But with this I alway get an exception like:
Do I misuse the Cheers |
Beta Was this translation helpful? Give feedback.
Answered by
rockfordlhotka
Mar 15, 2024
Replies: 1 comment 1 reply
-
The You can use it the original way, by creating a command object and then executing it, or you can use it the new way by calling execute to create the command (like a fetch basically). |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
StefanOssendorf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Execute
attribute only works withCommandBase
types.You can use it the original way, by creating a command object and then executing it, or you can use it the new way by calling execute to create the command (like a fetch basically).