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())); } }
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())); } }