public IActionResult Delete(int id) { var sinif = _sinifService.GetByIdAsync(id).Result; _sinifService.Remove(sinif); return(RedirectToAction("Index")); }
public IActionResult Remove(int id) { var sinif = _sinifService.GetByIdAsync(id).Result; _sinifService.Remove(sinif); return(NoContent()); }