public GetCanalVendaQueryValidation(IAtlasDbContext _context)
 {
     context = _context;
     RuleFor(cv => cv.Id)
     .NotEmpty()
     .MustAsync(CanalVendaExistis).WithMessage("Motivo não encontrado.");
 }
Esempio n. 2
0
        public GetStatusValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(s => s.Id)
            .NotEmpty()
            .MustAsync(StatusExists).WithMessage("Status não existe.");
        }
        public DeleteAssuntoCommandValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(a => a.Id)
            .NotEmpty();
            //.MustAsync(AssuntoExist).WithMessage("Assunto não encontrado");
        }
Esempio n. 4
0
        public DeleteMotivoCommandValidation(IAtlasDbContext context)
        {
            _context = context;

            RuleFor(m => m.Id)
            .NotEmpty()
            .MustAsync(MotivoExistis).WithMessage("Motivo não existel");
        }
Esempio n. 5
0
        public DeleteCanalVendaCommandValidation(IAtlasDbContext _context)
        {
            context = _context;

            RuleFor(cv => cv.Id)
            .NotEmpty()
            .MustAsync(CanalVendaExistis).WithMessage("Canal de venda não encontrado");
        }
Esempio n. 6
0
        public GetMotivoQueryValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(m => m.Id)
            .NotEmpty()
            .MustAsync(MotivoExistis).WithMessage("Motivo não encontrado.");
        }
        public GetCanalReclamacaoQueryValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(cr => cr.Id)
            .NotEmpty()
            .MustAsync(CanalReclamacaoExist).WithMessage("Canal de reclamação não existe");
        }
        public GetAssuntoQueryValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(a => a.Id)
            .NotEmpty()
            .NotNull()
            .MustAsync(AssuntoExist).WithMessage("Assunto não existe.");
        }
Esempio n. 9
0
        public CreateMotivoCommandValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(m => m.Motivo)
            .NotNull();

            RuleFor(m => m.Motivo.Descricao)
            .NotEmpty();
        }
        public UpdatePasswordCommandValidation(IAtlasDbContext context, ICurrentUserService currentUserService)
        {
            _context            = context;
            _currentUserService = currentUserService;

            RuleFor(u => u.Password)
            .NotEmpty()
            .MinimumLength(8);

            RuleFor(u => u)
            .MustAsync(Authorize).WithMessage("Operação não autorizada.");
        }
Esempio n. 11
0
        public LoginCommandValidation(IAtlasDbContext context)
        {
            _context = context;

            RuleFor(l => l.Username)
            .NotEmpty();

            RuleFor(l => l.Password)
            .NotEmpty();

            RuleFor(l => l)
            .MustAsync(ValidateUser).WithMessage("Usuário ou Senha incorretos.");
        }
        public PostCanalReclamacaoCommandValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(cr => cr.CanalReclamacao)
            .NotNull();

            RuleFor(cr => cr.CanalReclamacao.Descricao)
            .NotEmpty();

            RuleFor(cr => cr.CanalReclamacao.Id)
            .Empty();
        }
Esempio n. 13
0
        public UpdateAssuntoCommandValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(a => a.Assunto)
            .NotNull();

            RuleFor(a => a.Assunto.Descricao)
            .NotEmpty();

            RuleFor(a => a.Assunto.Id)
            .NotEmpty()
            .MustAsync(AssuntoExist).WithMessage("Assunto não existe");
        }
Esempio n. 14
0
        public UpdateCanalVendaCommandValidation(IAtlasDbContext _context)
        {
            context = _context;

            RuleFor(cv => cv.CanalVenda)
            .NotNull();

            RuleFor(cv => cv.CanalVenda.Descricao)
            .NotEmpty();

            RuleFor(cv => cv.CanalVenda.Id)
            .NotEmpty()
            .MustAsync(CanalVendaExistis).WithMessage("Canal de venda não existe.");
        }
        public UpdateCanalReclamacaoCommandValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(cr => cr.CanalReclamacao)
            .NotNull();

            RuleFor(cr => cr.CanalReclamacao.Descricao)
            .NotEmpty();

            RuleFor(cr => cr.CanalReclamacao.Id)
            .NotEmpty()
            .MustAsync(CanalReclamacaoExist).WithMessage("Canal de reclamação não existe");
        }
Esempio n. 16
0
        public UpdateMotivoCommandValidation(IAtlasDbContext context)
        {
            this.context = context;

            RuleFor(m => m.Motivo)
            .NotNull();

            RuleFor(m => m.Motivo.Descricao)
            .NotEmpty();

            RuleFor(m => m.Motivo.Id)
            .NotEmpty()
            .MustAsync(MotivoExistis).WithMessage("Motivo não encontrado.");
        }
Esempio n. 17
0
 public GetUserRolesQueryHandler(IAtlasDbContext context, IMapper mapper)
 {
     this._context = context;
     this._mapper  = mapper;
 }
Esempio n. 18
0
 public ListCanalReclamacaoHandler(IAtlasDbContext context, IMapper mapper)
 {
     this._context = context;
     this._mapper  = mapper;
 }
Esempio n. 19
0
 public ListRolesQueryHandler(IAtlasDbContext context, IMapper mapper)
 {
     _context     = context;
     this._mapper = mapper;
 }
Esempio n. 20
0
 public ListAssuntoHandler(IAtlasDbContext context, IMapper mapper)
 {
     this._context = context;
     this._mapper  = mapper;
 }
Esempio n. 21
0
 public GetStatusHandler(IAtlasDbContext context, IMapper mapper)
 {
     this._context = context;
     this._mapper  = mapper;
 }
Esempio n. 22
0
 public ListCanalVendaQueryHandler(IAtlasDbContext context, IMapper mapper)
 {
     this._context = context;
     this._mapper  = mapper;
 }
Esempio n. 23
0
 public ListUsersQueryHandler(IAtlasDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Esempio n. 24
0
 public RegisterUserCommandHandler(IAtlasDbContext context)
 {
     _context = context;
 }
Esempio n. 25
0
 public UpdatePasswordCommandHandler(IAtlasDbContext context)
 {
     _context = context;
 }
Esempio n. 26
0
 public DeleteCanalVendaHandler(IAtlasDbContext context, IMapper mapper)
 {
     this._context = context;
     this._mapper  = mapper;
 }
Esempio n. 27
0
 public ResetPasswordCommandHandler(IAtlasDbContext context)
 {
     _context = context;
 }
Esempio n. 28
0
 public ListMotivoQueryHandler(IAtlasDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
Esempio n. 29
0
 public DeleteMotivoCommandHandler(IAtlasDbContext context, IMapper mapper)
 {
     this._context = context;
     this._mapper  = mapper;
 }
Esempio n. 30
0
 public GetMotivoHandler(IAtlasDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }