コード例 #1
0
        public async Task <IActionResult> SaveZoneAsync([FromBody] Zone Zone)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

            var ZoneCreated = await _ZoneService.SaveZoneAsync(Zone);

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