protected virtual IEnumerable <ShipMethod_ReadListOutput> ReadList() { IShipMethodService svcShipMethod = DI.Resolve <IShipMethodService>(); IEnumerable <ShipMethod_ReadListOutput> outReadList = svcShipMethod.ReadList(); if (svcShipMethod is IDisposable) { ((IDisposable)svcShipMethod).Dispose(); } return(outReadList); }
public ActionResult ReadList() { ActionResult response = null; try { if (ModelState.IsValid) { Output <ICollection <ShipMethod_ReadListOutput> > output = svc.ReadList(); response = StatusCode((int)output.HttpStatus, output); return(response); } else { ModelValidation.AddModelErrors(currentErrors, ModelState); } } catch (Exception ex) { currentErrors.MergeWith(errorsParser.FromException(ex)); } response = StatusCode((int)currentErrors.HttpStatus, new Output(currentErrors)); return(response); }