Ejemplo n.º 1
0
 public Task <ObjectResult> CreateResponse(object result, HttpStatusCode httpStatusCode = HttpStatusCode.OK)
 {
     return(Task.FromResult(_domainEvent.IsError() ? StatusCode((int)HttpStatusCode.BadRequest, _domainEvent.GetErrorMessages()) : StatusCode((int)httpStatusCode, result)));
 }