public async Task <ActionResult> GetAll([FromServices] ITreinoService service)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                return(Ok(await _service.GetAll()));
            }
            catch (ArgumentException e)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message));
            }
        }
 public TreinoController(ITreinoService service)
 {
     _service = service;
 }