예제 #1
0
        public async Task <IActionResult> Delete()
        {
            IEnumerable <Vacancy> vacancies = vacancyManager.GetVacancies();

            foreach (Vacancy vacancy in vacancies.ToList())
            {
                await vacancyManager.Delete(vacancy.Id);
            }

            return(NoContent());
        }
        public async Task <IActionResult> Delete(long id)
        {
            await _vacancyManager.Delete(id);

            return(RedirectToAction(
                       actionName: nameof(Index),
                       controllerName: nameof(VacancyController).TrimControllerName()));
        }
예제 #3
0
 /// <inheritdoc/>
 public void Delete(int id)
 {
     vacancyManager.Delete(id);
 }