Ejemplo n.º 1
0
 public OperationResult Post(Widget w)
 {
     var ir = new InternalRepresentationOfWidget(w);
     _validator.ValidateAndThrow(ir);
     return new OperationResult.OK(new object());
 }
Ejemplo n.º 2
0
 public async Task<IHttpActionResult> Post(Widget w)
 {
     var ir = new InternalRepresentationOfWidget(w);
     await _businessRules.ValidateAndThrowAsync(ir).ConfigureAwait(false);
     return Ok(w);
 }