Example #1
0
        public async Task <IHttpActionResult> Remove([FromBody] QuadroModel model)
        {
            object result = await repository.Remove(rhNetContext, model);

            if (result.GetType() == typeof(QuadroModel))
            {
                return(Ok(result));
            }
            else
            {
                return(BadRequest(result.ToString()));
            }
        }
Example #2
0
        public async Task <ActionResult> Remove([FromServices] RhNetContext rhNetContext, [FromBody] QuadroModel quadroModel)
        {
            QuadroRepository repository = new QuadroRepository();
            object           result     = await repository.Remove(rhNetContext, quadroModel);

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