Class CommandResult
Represents the result of a command operation without a return value
public record CommandResult : IEquatable<CommandResult>
- Inheritance
-
CommandResult
- Implements
- Inherited Members
Constructors
CommandResult(bool, string?)
Represents the result of a command operation without a return value
public CommandResult(bool Success, string? ErrorMessage = null)
Parameters
Properties
ErrorMessage
public string? ErrorMessage { get; init; }
Property Value
Success
public bool Success { get; init; }
Property Value
Methods
Fail(string)
Creates a failed command result with an error message
public static CommandResult Fail(string errorMessage)
Parameters
errorMessagestring
Returns
Ok()
Creates a successful command result
public static CommandResult Ok()