예제 #1
0
        public IActionResult SaveZone([FromBody] Zone Zone)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (Zone == null)
            {
                return(BadRequest());
            }

            var ZoneCreated = _ZoneService.SaveZone(Zone);

            return(CreatedAtAction("GetById", new { id = ZoneCreated.Id }, ZoneCreated));
        }