public async Task <IHttpActionResult> Update([FromBody] SubquadroModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            object result = await repository.Update(rhNetContext, model);

            if (result.GetType() == typeof(SubquadroModel))
            {
                return(Ok(result));
            }
            else
            {
                return(BadRequest(result.ToString()));
            }
        }
        public async Task <ActionResult> Update([FromServices] RhNetContext rhNetContext, [FromBody] SubquadroModel subquadroModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            SubquadroRepository repository = new SubquadroRepository();
            object result = await repository.Update(rhNetContext, subquadroModel);

            if (result.GetType() == typeof(SubquadroModel))
            {
                return(Ok(result));
            }
            else
            {
                return(BadRequest(result.ToString()));
            }
        }