move services to separate project
+ add GetByUserId methods to Survey
This commit is contained in:
parent
4caf3de6fe
commit
cc89ff818b
8 changed files with 37 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue