public IActionResult Put([FromBody] CreateEditViewModel model) { model.ID = EncryptionHelper.DecryptUrlParam(model.ID); var orgUnit = _organizationUnitProvider.Get(Convert.ToInt32(model.ID)); model.ParentID = string.IsNullOrEmpty(model.ParentID) ? (string)null : EncryptionHelper.DecryptUrlParam(model.ParentID); model.SuperiorID = string.IsNullOrEmpty(model.SuperiorID) ? (string)null : EncryptionHelper.DecryptUrlParam(model.SuperiorID); var orgUnitMApper = _mapper.Map(model, orgUnit); _organizationUnitProvider.Edit(orgUnitMApper); return(Ok()); }