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