public async Task <IActionResult> DeleteStudentForInstitute(Guid instituteId, Guid studentId) { if (!await _instituteRepository.InstituteExistsAsync(instituteId)) { return(NotFound()); } var studentEntity = await _instituteRepository.GetStudentAsync(instituteId, studentId); if (studentEntity == null) { return(NotFound()); } _instituteRepository.DeleteStudent(studentEntity); await _instituteRepository.SaveAsync(); return(NoContent()); }