public async Task <IHttpActionResult> GetAll() { try { var entities = await _tipoAccesoRepository.GetAll(); return(Ok(entities)); } catch (Exception e) { return(InternalServerError(e)); } }
[HttpGet] public async Task <IHttpActionResult> GetAll() { try { var entities = await _entityRepo.GetAll(); /*var products = await _productRepo.GetAll(); * var obj = new {message= "resultado OK", employees = entities, products = products}; * //return Ok(obj);*/ return(Ok(entities)); } catch (Exception e) { log.Error(new MDCSet(this.ControllerContext.RouteData), e); return(InternalServerError(e)); } }