internal bool InGood <T>(StdCollectionInputsId sci) { ValidId(sci.Id); InGood <T>((StdCollectionInputs)sci); return(ErrorResponse.Success); }
public async Task <ActionResult <Imports> > GetAllByCompany(StdCollectionInputsId sci) { if (!InGood <Import>(sci)) { return(BadRequest(ErrorResponse)); } try { return(await _service.GetAllByCompany(sci)); } catch (Exception ex) { ErrorResponse.Errors.Add(ex.Message); } return(null); }
public async Task <ActionResult <Imports> > GetAllByPerson(StdCollectionInputsId sci) { if (!InGood <Import>(sci)) { return(BadRequest(ErrorResponse)); } try { return(await _service.GetAllByPerson(sci)); } catch (Exception ex) { // new ServerError(Request, sci.Route, ex); } return(null); }