Fix deletion methods to directly use ID in services
Updated QuestionService and SurveyService to pass the ID directly to the repository's DeleteAsync method. This improves clarity and ensures consistency in how deletions are handled across both services. Updated SurveyLib
This commit is contained in:
parent
fe74490440
commit
658e25dd57
3 changed files with 3 additions and 3 deletions
|
|
@ -38,7 +38,7 @@ public class QuestionService : IQuestionService
|
|||
throw new NotFoundException("Question not found");
|
||||
}
|
||||
|
||||
await _questionRepository.DeleteAsync(question);
|
||||
await _questionRepository.DeleteAsync(id);
|
||||
}
|
||||
|
||||
public async Task<QuestionBase> GetQuestionByIdAsync(int id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue