move services to separate project

+ add GetByUserId methods to Survey
This commit is contained in:
Вячеслав 2025-04-19 00:33:03 +05:00
parent 4caf3de6fe
commit cc89ff818b
8 changed files with 37 additions and 3 deletions

View file

@ -41,4 +41,9 @@ public class SurveyRepository : ISurveyRepository
_context.Surveys.Remove(entity);
await _context.SaveChangesAsync();
}
public async Task<IEnumerable<Survey>> GetSurveysByUserIdAsync(int userId)
{
return await _context.Surveys.Where(s => s.CreatedBy == userId).ToListAsync();
}
}