protected virtual IEnumerable <SalesTerritory_ReadListOutput> ReadList() { ISalesTerritoryService svcSalesTerritory = DI.Resolve <ISalesTerritoryService>(); IEnumerable <SalesTerritory_ReadListOutput> outReadList = svcSalesTerritory.ReadList(); if (svcSalesTerritory is IDisposable) { ((IDisposable)svcSalesTerritory).Dispose(); } return(outReadList); }
public ActionResult ReadList() { ActionResult response = null; try { if (ModelState.IsValid) { Output <ICollection <SalesTerritory_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); }