Class CommandResponseDto<T>
- Namespace
- Raytha.Application.Common.Models
- Assembly
- Raytha.Application.dll
public record CommandResponseDto<T> : ICommandResponseDto<T>, IEquatable<CommandResponseDto<T>>
Type Parameters
T
- Inheritance
-
CommandResponseDto<T>
- Implements
-
- Inherited Members
-
Constructors
CommandResponseDto(IEnumerable<ValidationFailure>)
public CommandResponseDto(IEnumerable<ValidationFailure> errors)
Parameters
errors
IEnumerable<ValidationFailure>
CommandResponseDto(string, string)
public CommandResponseDto(string propertyName, string error)
Parameters
propertyName
string
error
string
CommandResponseDto(T)
public CommandResponseDto(T result)
Parameters
result
T
Properties
Error
public string Error { get; }
Property Value
- string
Result
Property Value
- T
Success
public bool Success { get; }
Property Value
- bool
Methods
AddErrors(IEnumerable<ValidationFailure>)
public void AddErrors(IEnumerable<ValidationFailure> errors)
Parameters
errors
IEnumerable<ValidationFailure>
GetErrors()
public IEnumerable<ValidationFailure> GetErrors()
Returns
- IEnumerable<ValidationFailure>