Changeset 6738cc0 for src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/StudentRepo.cs
Legend:
- Unmodified
- Added
- Removed
-
src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/StudentRepo.cs
rf3c4950 r6738cc0 21 21 public async Task<StudentSelfDto> GetStudentSelfDto(long applicationUserFk) 22 22 { 23 returnawait DbSet23 var user = await DbSet 24 24 .AsNoTracking() 25 25 .Include(x => x.Questions) … … 31 31 x.Reputation, 32 32 x.ImageUrl, 33 x.LastCheckedNotifications, 33 34 x.Questions.Select(y => new StudentQuestionDto(y.Uid, y.Title)), 34 x.StudentTeams.Select(y => new StudentTeamDto(y.Team.Uid, y.Team.Name)))) 35 x.StudentTeams.Select(y => new StudentTeamDto(y.Team.Uid, y.Team.Name)), 36 null)) 35 37 .FirstOrDefaultAsync(); 38 39 user.Notifications = await DbContext.StudentNotifications 40 .Where(x => x.CreatedOn > user.LastCheckedNotifications) 41 .Select(x => new StudentSelfNotificationDto(x.Uid, x.Text, x.CreatedOn, x.QuestionUid)) 42 .ToListAsync(); 43 44 return user; 36 45 } 37 46 }
Note:
See TracChangeset
for help on using the changeset viewer.