Exemple #1
0
 public AccessPointPagingQueryHandler(IAccessPointRepository accessPointRepository, IStringLocalizer <CommonTranslation> commonLocalizer, IStringLocalizer <AppBasicTranslation> appLocalizer, IIdentityService identityService)
 {
     this.accessPointRepository = accessPointRepository;
     this.commonLocalizer       = commonLocalizer;
     this.appLocalizer          = appLocalizer;
     this.identityService       = identityService;
 }
 public AccessPointCreateValidator(IStringLocalizer <CommonTranslation> localizer, IAccessPointRepository accessPointRepository)
 {
     this.accessPointRepository = accessPointRepository;
     RuleFor(cmd => cmd.Name).Must(x => !string.IsNullOrWhiteSpace(x)).WithMessage(localizer["FieldIsRequred", "Name"]);
     RuleFor(cmd => cmd.PointKey).Must(x => !string.IsNullOrWhiteSpace(x)).WithMessage(localizer["FieldIsRequred", "PointKey"]);
     RuleFor(cmd => cmd).Must(x => UniquePointKey(x.PointKey)).WithMessage(x => localizer["FieldValueIsDuplicate", x.PointKey, "PointKey"]);
 }
 public AccessPointPatchCommandHandler(IAccessPointRepository accessPointRepository, IMapper mapper, IStringLocalizer <CommonTranslation> commonLocalizer, IIdentityService identityService)
 {
     this.accessPointRepository = accessPointRepository;
     this.mapper          = mapper;
     this.commonLocalizer = commonLocalizer;
     this.identityService = identityService;
 }
Exemple #4
0
 public DBMigrationService(BasicAppContext context, IOptions <AppConfig> options, IOrganizationRepository organizationRepository, IAccessPointRepository accessPointRepository)
 {
     this.context = context;
     this.organizationRepository = organizationRepository;
     this.accessPointRepository  = accessPointRepository;
     appConfig = options.Value;
 }
Exemple #5
0
        public AccessPointPatchValidator(IStringLocalizer <CommonTranslation> localizer, IAccessPointRepository accessPointRepository)
        {
            this.accessPointRepository = accessPointRepository;

            RuleFor(cmd => cmd.Name).Must(x => !string.IsNullOrWhiteSpace(x)).WithMessage(localizer["FieldIsRequred", "Name"]);
            RuleFor(cmd => cmd.PointKey).Must(x => !string.IsNullOrWhiteSpace(x)).WithMessage(localizer["FieldIsRequred", "PointKey"]);
            RuleFor(cmd => cmd).Must(x => UniquePointKey(x.Id, x.PointKey)).WithMessage(x => localizer["FieldValueIsDuplicate", x.PointKey, "PointKey"]);
            RuleFor(cmd => cmd.Id).MustAsync(async(id, token) => await ExitRecord(id)).WithMessage(cmd => localizer["HttpRespond.NotFound", "AccessPoint", cmd.Id]);
            RuleFor(cmd => cmd.Id).MustAsync(async(id, token) => await NotInnerValue(id)).WithMessage(cmd => localizer["CannotUpdateInnerValue"]);
        }
 public AccessPointIdentityQueryHandler(IAccessPointRepository accessPointRepository, IStringLocalizer <CommonTranslation> localizer, IStringLocalizer <AppBasicTranslation> appLocalizer)
 {
     this.accessPointRepository = accessPointRepository;
     this.localizer             = localizer;
     this.appLocalizer          = appLocalizer;
 }
 public AccessPointsController(IAccessPointRepository repository)
 {
     _repository = repository;
 }
Exemple #8
0
 public AccessPointCreateCommandHandler(IAccessPointRepository accessPointRepository, IIdentityService identityService)
 {
     this.accessPointRepository = accessPointRepository;
     this.identityService       = identityService;
 }