Exemplo n.º 1
0
        public async Task <IActionResult> Post([FromBody] ServicioDTO servicio)
        {
            //await Service.Insert(servicio);
            //return Ok(true);
            if (!ModelState.IsValid)
            {
                throw new Exception("Model is not Valid");
            }
            await Service.Insert(servicio);

            return(Ok(true));
        }