How does the ExecuteAttribute work #3738
-
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.
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.
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).