public async Task <ActionResult <IEnumerable <Map> > > GetAll([FromServices] IMapService MapService) { try { var maps = await MapService.GetAll(); return(Ok(maps)); } catch { return(BadRequest(new { message = Messages.NAO_FOI_POSSIVEL_BUSCAR_OS_MAPAS })); } }
public async Task <ActionResult <MasterMaps> > GetAll(StdCollectionInputs sci) { if (!InGood <MasterMap>(sci)) { return(BadRequest(ErrorResponse)); } try { return(await _service.GetAll(sci)); } catch (Exception ex) { // new ServerError(Request, sci.Route, ex); } return(null); }