コード例 #1
0
        public IActionResult AddLocation([FromBody] CreateEditJobTitleViewModel location)
        {
            var model = new OrganizationListLocation();

            if (location is null)
            {
                return(BadRequest("Location is null."));
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            location.OrganizationID = EncryptionHelper.DecryptUrlParam(location.OrganizationID);
            int headerID = Int32.Parse(location.OrganizationID);

            var locationMapper = _mapper.Map(location, model);

            _organizationUnitProvider.AddLocation(locationMapper);
            return(Ok(location));
        }