deletions update

This commit is contained in:
Вячеслав 2025-05-20 15:59:55 +05:00
parent 6f8ef78577
commit 7bbcd07c39
10 changed files with 71 additions and 22 deletions

View file

@ -36,9 +36,9 @@ public class QuestionRepository : IQuestionRepository
await _context.SaveChangesAsync();
}
public async Task DeleteAsync(QuestionBase entity)
public async Task DeleteAsync(int id)
{
_context.Questions.Remove(entity);
await _context.Questions.Where(q => q.Id == id).ExecuteDeleteAsync();
await _context.SaveChangesAsync();
}