/// <summary> /// Checks if the Guid is not empty /// </summary> /// <param name="param">Data that will be validated.</param> public static ArgumentValidationResult IdNotEmpty(this Param <Guid> param) { if (param._value == Guid.Empty) { var domainError = DomainError.New(param._name, DomainMessage.IdNotExist(param._name)); return(ArgumentValidationResult.New(domainError)); } return(ArgumentValidationResult.Success); }
public static IResponse Error() { var domainError = DomainError.New(string.Empty, "Não foi possível processar a requisição"); var response = new Response() { Status = ResponseStatusEnum.FatalError, }; response.AddError(domainError); return(response); }