Example #1
0
        public async Task <IActionResult> CreateCompanySection([FromBody] CompanySectionViewModel model)
        {
            try {
                if (ModelState.IsValid)
                {
                    var result = await _companyBusinessManager.CreateSection(_mapper.Map <CompanySectionDto>(model));

                    return(Ok(_mapper.Map <CompanySectionViewModel>(result)));
                }
            } catch (Exception er) {
                return(BadRequest(er.Message));
            }
            return(Ok());
        }