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())); }
/// <inheritdoc/> public void Delete(int id) { vacancyManager.Delete(id); }