Exemplo n.º 1
0
 public DealerService(DealerDbContext dealerDbContext, IMapper mapper, ILogger <DealerService> logger,
                      IAuthorizationService authorizationService, IUserContextService userContextService)
 {
     this._dealerDbContext      = dealerDbContext;
     this._mapper               = mapper;
     this._logger               = logger;
     this._authorizationService = authorizationService;
     this._userContextService   = userContextService;
 }
        public RegisterDtoValidator(DealerDbContext dealerDbContext)
        {
            RuleFor(e => e.Email)
            .NotEmpty()
            .EmailAddress();

            RuleFor(e => e.Email)
            .Custom((email, context) =>
            {
                var checkEmail = dealerDbContext.Users.Any(u => u.Email == email);
                if (checkEmail)
                {
                    context.AddFailure("Email :", "Please insert another email this is taken");
                }
            });

            RuleFor(p => p.Password).MinimumLength(6).MaximumLength(150);

            RuleFor(p => p.ConfirmPassword).Equal(p => p.Password);
        }
Exemplo n.º 3
0
 public MultiDealerRequimentHandler(DealerDbContext dealerDbContext)
 {
     this._dealerDbContext = dealerDbContext;
 }
Exemplo n.º 4
0
 public DealerRepository(DealerDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
Exemplo n.º 5
0
 public DealerSeeder(DealerDbContext dealerDbContext)
 {
     this._dealerDbContext = dealerDbContext;
 }
Exemplo n.º 6
0
 public FeaturesController(DealerDbContext context, IMapper mapper)
 {
     this.mapper  = mapper;
     this.context = context;
 }
Exemplo n.º 7
0
 public MakesController(DealerDbContext context, IMapper mapper)
 {
     this.Mapper  = mapper;
     this.context = context;
 }
Exemplo n.º 8
0
 public CarController(ICarService carService, DealerDbContext dealerDbContext)
 {
     this._carService      = carService;
     this._dealerDbContext = dealerDbContext;
 }
Exemplo n.º 9
0
 public AccountService(DealerDbContext dealerDbContext, IPasswordHasher <User> passwordHasher, AuthenticationSettings authenticationSettings)
 {
     this._dealerDbContext        = dealerDbContext;
     this._passwordHasher         = passwordHasher;
     this._authenticationSettings = authenticationSettings;
 }
Exemplo n.º 10
0
 public VehiclesController(DealerDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
Exemplo n.º 11
0
 public CarService(DealerDbContext dealerDbContext, IMapper mapper)
 {
     this._dealerDbContext = dealerDbContext;
     this._mapper          = mapper;
 }