Struct DeletionResult
Represents the result of a deletion operation, which can succeed, fail due to not being found, or fail due to an error.
public readonly struct DeletionResult
- Inherited Members
- Extension Methods
Properties
WasNotFound
Gets a value indicating whether the deletion failed due to the entity not being found.
public bool WasNotFound { get; }
Property Value
Methods
Error(ResultProblemCollection)
Creates a deletion result representing failure due to an error.
public static DeletionResult Error(ResultProblemCollection problems)
Parameters
problemsResultProblemCollectionThe problems associated with the failure.
Returns
- DeletionResult
A failure result.
Error(params IEnumerable<ResultProblem>)
Creates a deletion result representing failure due to an error.
public static DeletionResult Error(params IEnumerable<ResultProblem> problems)
Parameters
problemsIEnumerable<ResultProblem>The problems associated with the failure.
Returns
- DeletionResult
A failure result.
NotFound()
Creates a deletion result representing failure due to the entity not being found.
public static DeletionResult NotFound()
Returns
Success()
Creates a deletion result representing success.
public static DeletionResult Success()