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
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
ExceptionStackTrace
Gets the stack trace if there was an exception.
public string ExceptionStackTrace { get; init; }
Property Value
HasExceptions
Gets whether or not there are any exceptions that occurred.
public bool HasExceptions { get; }
Property Value
IsAuthorized
Gets whether or not the query was authorized to execute.
public bool IsAuthorized { get; init; }
Property Value
IsSuccess
Gets whether or not the query executed successfully.
public bool IsSuccess { get; }
Property Value
IsValid
Gets whether or not the query is valid.
public bool IsValid { get; }
Property Value
Paging
Gets or inits the PagingInfo for the query.
public PagingInfo Paging { get; set; }
Property Value
ValidationResults
Gets any validation errors. If this collection is empty, there are errors.
public IEnumerable<ValidationResult> ValidationResults { get; init; }