Table of Contents

Class QueryResult<T>

Namespace
Cratis.Applications.Queries
Assembly
Cratis.Applications.dll

Represents the result coming from performing a query.

public class QueryResult<T>

Type Parameters

T

Type of the data returned.

Inheritance
QueryResult<T>
Inherited Members

Fields

Success

Represents a successful command result.

public static readonly QueryResult<T> Success

Field Value

QueryResult<T>

Properties

CorrelationId

Gets the CorrelationId associated with the command.

public CorrelationId CorrelationId { get; init; }

Property Value

CorrelationId

Data

The data returned.

public T Data { get; set; }

Property Value

T

ExceptionMessages

Gets any exception messages that might have occurred.

public IEnumerable<string> ExceptionMessages { get; set; }

Property Value

IEnumerable<string>

ExceptionStackTrace

Gets the stack trace if there was an exception.

public string ExceptionStackTrace { get; init; }

Property Value

string

HasExceptions

Gets whether or not there are any exceptions that occurred.

public bool HasExceptions { get; }

Property Value

bool

IsAuthorized

Gets whether or not the query was authorized to execute.

public bool IsAuthorized { get; init; }

Property Value

bool

IsSuccess

Gets whether or not the query executed successfully.

public bool IsSuccess { get; }

Property Value

bool

IsValid

Gets whether or not the query is valid.

public bool IsValid { get; }

Property Value

bool

Paging

Gets or inits the PagingInfo for the query.

public PagingInfo Paging { get; set; }

Property Value

PagingInfo

ValidationResults

Gets any validation errors. If this collection is empty, there are errors.

public IEnumerable<ValidationResult> ValidationResults { get; init; }

Property Value

IEnumerable<ValidationResult>