public async Task <ActionResult> GetTime([FromRoute] Guid id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var result = await _timeAppService.Get(id); var back = _mapper.Map <TimeEntity, TimeViewModel>(result); return(Ok(back)); } catch (ArgumentException ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message)); } }
private static bool verificarSigla(string sigla) { return(!_timeAppService.Get(x => x.sigla == sigla).Any()); }