public UserService(PlayerStatsDbContext dbContext, IMapper mapper, ILogger <UserService> logger, IPasswordHasher <User> passwordHasher, AutheticationSettings autheticationSettings) { _dbContext = dbContext; _mapper = mapper; _logger = logger; _passwordHasher = passwordHasher; _autheticationSettings = autheticationSettings; }
public CreateUserDtoValidator(PlayerStatsDbContext dbContext) { RuleFor(x => x.EmailAddress).NotEmpty().EmailAddress(); RuleFor(x => x.Password).MinimumLength(6); RuleFor(x => x.ConfirmPassword).Equal(e => e.Password); RuleFor(x => x.EmailAddress) .Custom((value, context) => { var emailInUse = dbContext.User.Any(u => u.EmailAddress == value); if (emailInUse) { context.AddFailure("EmailAdress", "That email is taken"); } }); }
public PlayerStatsSeeder(PlayerStatsDbContext dbContext) { _dbContext = dbContext; }
public CategoryService(PlayerStatsDbContext dbContext, IMapper mapper, ILogger <Category> logger) { _dbContext = dbContext; _mapper = mapper; _logger = logger; }
public GameService(PlayerStatsDbContext dbContext, IMapper mapper, ILogger <GameService> logger) { _dbContext = dbContext; _mapper = mapper; _logger = logger; }