コード例 #1
0
 public NotificationsDbContextCleaner(
     NotificationsDbContext context,
     IWebHostEnvironment environment,
     ILogger <NotificationsDbContextCleaner> logger
     ) : base(context, environment, logger)
 {
     Users = context.Set <User>();
 }
コード例 #2
0
 public IReadOnlyCollection <UserNotification> NotificationsForUser(int userId)
 => _dbContext.Set <UserNotificationEntity>()
 .Where(x => x.UserId == userId)
 .Select(e => Map <UserNotificationEntity, UserNotification>(e))
 .ToList()
 .AsReadOnly();