public IHttpActionResult Post([FromBody] VacancyDTO vacancy)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var updatedVacancy = service.Add(vacancy);

            return(Json(updatedVacancy, BOT_SERIALIZER_SETTINGS));
        }
        public IActionResult Create([Bind] VacancyCreateModel vacancyData)
        {
            if (!ModelState.IsValid)
            {
                return(View(vacancyData));
            }

            var id      = VacancyService.Add(vacancyData.ToModel(OrganizationService));
            var success = id != null && id != Guid.Empty.ToString();

            var model = new IndexPageStatusModel
            {
                StatusId  = $"{nameof(Create)}:{success}",
                VacancyId = id
            };

            return(RedirectToAction(nameof(Index), model));
        }
 public string Add(VacancyModel vacancy)
 => VacancyService.Add(vacancy);