public IActionResult Put([FromBody] CreateEditViewModel model) { DataClaim.GetClaim(Request); if (model == null) { return(BadRequest("Level is null.")); } if (!ModelState.IsValid) { return(BadRequest()); } var decryptedID = Convert.ToInt32(EncryptionHelper.DecryptUrlParam(model.ID)); model.ID = decryptedID.ToString(); var level = _levelProvider.Get(Convert.ToInt32(model.ID)); var levelMapper = _mapper.Map(model, level); _levelProvider.Edit(levelMapper); return(Ok()); }