private static Task <TResponse> Erros(IEnumerable <ValidationFailure> failures) { var response = new CommandResponse(); foreach (var failure in failures) { response.AddError(failure.ErrorMessage); } return(Task.FromResult(response as TResponse)); }