コード例 #1
0
        public IActionResult Put(int id, Areas model)
        {
            if (model == null)
            {
                return(BadRequest(MessageFactory.CreateParamsIsNullMessage()));
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var entity = _areasService.GetByPk(id);

            if (entity == null)
            {
                return(NotFound());
            }
            _areasService.Update(model);
            return(Ok());
        }