public async Task <IActionResult> DeleteExam([FromRoute] int id) // nie trzeba { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var exam = await _service.FindExam(id); if (exam == false) { return(NotFound()); } await _service.DeleteExam(id); return(Ok(exam)); }