コード例 #1
0
        public async Task <IActionResult> Put(Locations value)
        {
            var entity = await _service.Update(value);

            if (entity != null)
            {
                return(Ok(entity));
            }
            else
            {
                return(BadRequest("something broke"));
            }
        }
コード例 #2
0
        public IActionResult Put(string id, Location locationIn)
        {
            var selectedLocation = _locationsService.Get(id);

            if (selectedLocation == null)
            {
                return(NotFound());
            }

            _locationsService.Update(id, locationIn);

            return(NoContent());
        }