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