public IActionResult EditLocation([FromBody] CreateEditLocationViewModel model) { if (model == null) { return(BadRequest(" Location is null.")); } if (!ModelState.IsValid) { return(BadRequest()); } var decryptedID = Convert.ToInt32(EncryptionHelper.DecryptUrlParam(model.ID)); model.ID = decryptedID.ToString(); var location = _organizationUnitProvider.GetLocationDetail(Convert.ToInt32(model.ID)); var locationMapper = _mapper.Map(model, location); _organizationUnitProvider.EditLocation(locationMapper); return(Ok()); }