public async Task <ActionResult> Detail_ReadListAsync([FromRoute] int _salesOrderId) { ActionResult response; try { if (ModelState.IsValid) { Output <ICollection <SalesOrderDetail_ReadListOutput> > output = await svc.Detail_ReadListAsync(_salesOrderId); response = StatusCode((int)output.HttpStatus, output); return(response); } else { currentErrors.AddModelErrors(ModelState); } } catch (Exception ex) { currentErrors.MergeWith(errorsParser.FromException(ex)); } response = StatusCode((int)currentErrors.HttpStatus, new Output(currentErrors)); return(response); }