public CategoriesController(IArticleRepositoryAsync articleRepository, IPriceListRepositoryAsync articlePriceRepository, IShopSignRepositoryAsync shopSignRepository, IUserRepositoryAsync userRepository) { _articleRepository = (ArticleCacheRepositoryAsync)articleRepository ?? throw new ArgumentNullException(nameof(articleRepository)); _articlePriceRepository = articlePriceRepository ?? throw new ArgumentNullException(nameof(articlePriceRepository)); _shopSignRepository = shopSignRepository ?? throw new ArgumentNullException(nameof(shopSignRepository)); _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); }
public CreateUserCommandHandler(IUserRepositoryAsync userRepository, IMapper mapper, IPasswordService passwordService, IUserStatusRepositoryAsync userStatusRepository) { _userRepository = userRepository; _mapper = mapper; _PasswordService = passwordService; _userStatusRepository = userStatusRepository; }
public CreateUserCommandValidator(IUserRepositoryAsync userRepository) { this.userRepository = userRepository; RuleFor(p => p.UserName) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters.") .MustAsync(IsUniqueUserName).WithMessage("{PropertyName} already exists."); RuleFor(p => p.Password) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters."); RuleFor(p => p.FirstName) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters."); RuleFor(p => p.UserEmail) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters."); RuleFor(p => p.CreatedBy) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .WithMessage("{PropertyName} must not exceed 50 characters."); }
//private readonly IStockGroupRepositoryAsync _stockGroupRepository; public CatalogService(IArticleRepositoryAsync articleRepository, IPriceListRepositoryAsync articlePriceRepository, IShopSignRepositoryAsync shopSignRepository, IUserRepositoryAsync userRepository) { _articleRepository = (ArticleCacheRepositoryAsync)articleRepository ?? throw new ArgumentNullException(nameof(articleRepository)); _articlePriceRepository = articlePriceRepository ?? throw new ArgumentNullException(nameof(articlePriceRepository)); _shopSignRepository = shopSignRepository ?? throw new ArgumentNullException(nameof(shopSignRepository)); _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); //_stockGroupRepository = stockGroupRepository ?? throw new ArgumentNullException(nameof(stockGroupRepository)); }
public UnitOfWork( ApplicationDBContext context, IUserRepositoryAsync userRepositoryAsync ) { _context = context; Users = userRepositoryAsync; }
public GetUserByIdQueryValidator(IUserRepositoryAsync userRepository) { this.userRepository = userRepository; RuleFor(p => p.UserId) .NotEmpty().WithMessage("{PropertyName} is required.") .NotNull() .MustAsync(IsUserExists).WithMessage("{PropertyName} not exists."); }
public AuthenticationService(IUserRepositoryAsync userRepository, IOptions <JwtConfig> jwtSettings, IPasswordService passwordService, ILoginLogRepositoryAsync loginLogRepository, ILoginLogTypeRepositoryAsync loginLogTypeRepository, IUserTokenRepositoryAsync userTokenRepository, IEmailTemplateRepositoryAsync emailTemplateRepository, IEmailRecipientRepositoryAsync emailRecipientRepository) { _UserRepository = userRepository; _jwtSettings = jwtSettings.Value; _PasswordService = passwordService; _LoginLogRepository = loginLogRepository; _LoginLogTypeRepository = loginLogTypeRepository; _UserTokenRepository = userTokenRepository; _EmailTemplateRepository = emailTemplateRepository; _EmailRecipientRepository = emailRecipientRepository; }
public UsersControllerTests() { _repo = Substitute.For <IUserRepositoryAsync>(); _controller = new UsersController(_repo); }
public UsersController(IUserRepositoryAsync repo) { _repo = repo; }
public AuthController(IUserRepositoryAsync <IdentityUser> userRepository, UserManager <IdentityUser> userManager) { _userRepository = userRepository; _userManager = userManager; }
public UserServiceAsync(IUserRepositoryAsync userRepository) { _userRepository = userRepository; }
public UpdateUserCommandHandler(IUserRepositoryAsync userRepository, IUserStatusRepositoryAsync userStatusRepository, IMapper mapper) { _userRepository = userRepository; _userStatusRepository = userStatusRepository; _mapper = mapper; }
public GetAllUsersQueryHandler(IUserRepositoryAsync userRepository, IMapper mapper = null) { _userRepository = userRepository; _mapper = mapper; }
public GetUserByIdQueryHandler(IUserRepositoryAsync userRepository, IMapper mapper) { _userRepository = userRepository; _mapper = mapper; }
public UserServices(IUserRepository userRepository, IUserRepositoryAsync userRepositoryAsync) { this.userRepository = userRepository; this.userRepositoryAsync = userRepositoryAsync; }