Table of Contents

Struct DeletionResult

Namespace
Olve.Results
Assembly
Olve.Results.dll

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

bool

Methods

Error(ResultProblemCollection)

Creates a deletion result representing failure due to an error.

public static DeletionResult Error(ResultProblemCollection problems)

Parameters

problems ResultProblemCollection

The 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

problems IEnumerable<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

DeletionResult

Success()

Creates a deletion result representing success.

public static DeletionResult Success()

Returns

DeletionResult