public IActionResult Delete(int id) { if (id > 0) { _employeesService.Delete(id); } return(RedirectToAction(nameof(Employees))); //return View(Employees()); }
public IActionResult Remove(EmployeeViewModel model) { if (model.Id == 0) { return(NotFound()); } _employeesService.Delete(model.Id); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> Delete(int id) { if (!ModelState.IsValid) { return(BadRequest(new ModelStateResult(ModelState))); } var deleteEmployeeResultDto = await _employeesService.Delete(id, UserId); return(Ok(deleteEmployeeResultDto)); }
public IActionResult Delete(int?id) { var model = _employeesService.GetById(id.Value); if (model == null) { return(NotFound()); } _employeesService.Delete(id.Value); _bookService.DeleteAllByOwnerId(id.Value); return(RedirectToAction("Index")); }
public IActionResult Delete(int Id) { _employeesService.Delete(Id); return(RedirectToAction(nameof(Employee))); }
public IActionResult Delete(EmployeerViewModel emp) { _EmployeesData.Delete(emp.ID); return(RedirectToAction("Index")); }
public void Delete(string id) { employeesServiceDelegate.Delete(id); }
public IActionResult Delete(int id) { _employeesService.Delete(id); return(RedirectToAction(nameof(Index))); }
public IActionResult Delete(Employee emp) { empService.Delete(emp); return(NoContent()); }
public void Delete(int id) => _employeesService.Delete(id);
public IActionResult Delete(int id) { _employees.Delete(id); return(RedirectToAction("Employees")); }
public async Task <IActionResult> Delete([FromRoute] string id) { await employeesService.Delete(id); return(StatusCode((int)StatusCodes.Status204NoContent)); }
public bool Delete(int id) { return(_employeesService.Delete(id)); }
public async Task <IActionResult> Delete(int id) { await _employeesService.Delete(id); return(NoContent()); }