Пример #1
0
 public SorteioService(IParticipanteRepository participanteRepository, ISorteioRepository sorteioRepository,
                       IParticipanteSorteioRepository participanteSorteioRepository)
 {
     ParticipanteRepository        = participanteRepository;
     SorteioRepository             = sorteioRepository;
     ParticipanteSorteioRepository = participanteSorteioRepository;
 }
 public ParticipanteController(IParticipanteRepository participanteRepository, IParticipanteSorteioRepository participanteSorteioRepository,
                               IEnderecoRepository enderecoRepository)
 {
     ParticipanteRepository        = participanteRepository;
     ParticipanteSorteioRepository = participanteSorteioRepository;
     EnderecoRepository            = enderecoRepository;
 }
Пример #3
0
 public CursoService(ICursoRepository repository, IParticipanteRepository participanteRepository, ILeccionRepository leccionRepository, IMapper mapper)
 {
     this.participanteRepository = participanteRepository;
     this.leccionRepository      = leccionRepository;
     this.repository             = repository;
     this.mapper = mapper;
 }
 public ParticipanteService(IParticipanteRepository repository, IConocimientoRepository conocimientoRepository, IMapper mapper, IConfiguration config)
 {
     this.mapper                 = mapper;
     this.repository             = repository;
     this.conocimientoRepository = conocimientoRepository;
     this.config                 = config;
 }
Пример #5
0
 public ParticipanteAppService(IBus bus,
                               IMapper mapper,
                               IParticipanteRepository participanteRepository)
 {
     _bus    = bus;
     _mapper = mapper;
     _participanteRepository = participanteRepository;
 }
Пример #6
0
 public LoginBusiness(IContaRepository contaRepository,
                      IParticipanteRepository participanteRepository,
                      ILeiloeiroRepository leiloeiroRepository)
 {
     _contaRepository        = contaRepository;
     _participanteRepository = participanteRepository;
     _leiloeiroRepository    = leiloeiroRepository;
 }
Пример #7
0
 public ParticipanteMoreController(IParticipanteRepository rep, IParticipanteApplicationService app, ILoggerFactory logger, EnviromentInfo env, CurrentUser user)
 {
     this._rep    = rep;
     this._app    = app;
     this._logger = logger.CreateLogger <ParticipanteMoreController>();
     this._env    = env;
     this._user   = user;
 }
Пример #8
0
 public VendaController(IVendaRepository vendaRepository,
                        IParticipanteRepository participanteRepository,
                        IMapper mapper)
 {
     this.participanteRepository = participanteRepository;
     this.vendaRepository        = vendaRepository;
     this.mapper = mapper;
 }
Пример #9
0
 public ParticipanteController(IParticipanteRepository participanteRepository,
                               UserManager <IdentityUser> userManager,
                               IHttpContextAccessor httpContextAccessor,
                               SignInManager <IdentityUser> signInManager)
 {
     _participanteRepository = participanteRepository;
     _userManager            = userManager;
     _httpContextAccessor    = httpContextAccessor;
     _signInManager          = signInManager;
 }
 public ParticipanteController(INotificador notificador,
                               IParticipanteRepository ParticipanteRepository,
                               IParticipanteService Participanteservice,
                               IUser user,
                               IMapper mapper
                               ) : base(notificador, user)
 {
     _ParticipanteRepository = ParticipanteRepository;
     _Participanteservice    = Participanteservice;
     _mapper = mapper;
 }
Пример #11
0
 public ParticipanteController(IDomainNotificationHandler <DomainNotification> notifications,
                               IBus bus,
                               IParticipanteAppService participanteAppService,
                               IParticipanteRepository participanteRepository,
                               IMapper mapper) : base(notifications, bus)
 {
     _participanteAppService = participanteAppService;
     _participanteRepository = participanteRepository;
     _mapper = mapper;
     _bus    = bus;
 }
Пример #12
0
 public LoginModel(SignInManager <IdentityUser> signInManager,
                   ILogger <LoginModel> logger,
                   UserManager <IdentityUser> userManager,
                   IMembroRepository membroRepository,
                   IParticipanteRepository participanteRepository)
 {
     _userManager            = userManager;
     _signInManager          = signInManager;
     _logger                 = logger;
     _membroRepository       = membroRepository;
     _participanteRepository = participanteRepository;
 }
Пример #13
0
        public PredictionTrainerService(IRatingCursoRepository ratingCursoRepository, ICursoRepository cursoRepository, IParticipanteRepository participanteRepository,
                                        IPredictionTrainerRepository predictionTrainerRepository, IConfiguration config)
        {
            this.ratingCursoRepository       = ratingCursoRepository;
            this.cursoRepository             = cursoRepository;
            this.participanteRepository      = participanteRepository;
            this.predictionTrainerRepository = predictionTrainerRepository;
            var seqUrl = config.GetSection("AppSettings:SeqUrl").Value.ToString();

            Log.Logger = new LoggerConfiguration()
                         .MinimumLevel.Information()
                         .WriteTo.Seq(seqUrl)
                         .CreateLogger();
        }
Пример #14
0
        public async static Task Main(string[] args)
        {
            Console.WriteLine("Comenzó Generador de Data!");
            connection             = new SqlConnection(connectionString);
            nivelRepository        = new NivelRepository(connection);
            lineaCarreraRepository = new LineaCarreraRepository(connection);
            var conocimientoRepository = new ConocimientoRepository(connection);

            participanteRepository = new ParticipanteRepository(connection);
            ratingCursoRepository  = new RatingCursoRepository(connection);
            var authenticationRepository = new AuthenticationRepository(connection);

            cursoRepository = new CursoRepository(connection);

            var myProfile           = new AutoMapperProfiles();
            var configuration       = new MapperConfiguration(cfg => cfg.AddProfile(myProfile));
            var mapper              = new Mapper(configuration);
            var participanteService = new ParticipanteService(participanteRepository, conocimientoRepository, mapper, null);

            _authService = new AuthenticationService(authenticationRepository, participanteService, mapper);

            try
            {
                _faker = new ParticipanteFaker();

                await GenerarEscaladores();
                await GenerarSherpas();
                await GenerarAdmin();
                await GenerarCursoImagenes();

                for (int i = 0; i < 3; i++)
                {
                    await GenerarRatingCursosAleatorios();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Excepción: " + ex.Message);
            }
            Console.WriteLine("Finalizó Generador Data!");
            Console.ReadLine();
        }
Пример #15
0
        public ParticipanteValidator(IParticipanteRepository participanteRepo)
        {
            RuleFor(o => o.NomeCompleto)
            .NotEmpty().WithMessage("{PropertyName} é obrigatória");

            RuleFor(o => o.Apelido)
            .NotEmpty().WithMessage("{PropertyName} é obrigatória");

            RuleFor(o => o.Email)
            .NotEmpty().WithMessage("{PropertyName} é obrigatório")
            .MustAsync(async(o, cancellation) => await EmailUnico(o))
            .WithMessage("{PropertyValue} email ja cadastrado")
            .EmailAddress()
            .WithMessage("{PropertyName} inválido");

            async Task <bool> EmailUnico(string email)
            {
                var retorno = await participanteRepo.FindAsync(x => x.Email.Equals(email));

                return(retorno.IsNullOrEmpty());
            }
        }
Пример #16
0
 public EventoParticipanteController(IEventoParticipanteRepository eventoParticipanteRepository,
                                     IEventoRepository eventoRepository,
                                     IParticipanteRepository participanteRepository,
                                     IWebHostEnvironment webHostEnvironment,
                                     IComissaoOrganizadoraRepository comissaoOrganizadoraRepository,
                                     IDataImportanteRepository dataImportanteRepository,
                                     IHttpContextAccessor httpContextAccessor,
                                     IAlertaRepository alertaRepository,
                                     IEmailSender emailSender,
                                     IMembroOrganizadorRepository membroOrganizadorRepository)
 {
     _eventoParticipanteRepository   = eventoParticipanteRepository;
     _eventoRepository               = eventoRepository;
     _participanteRepository         = participanteRepository;
     _webHostEnvironment             = webHostEnvironment;
     _comissaoOrganizadoraRepository = comissaoOrganizadoraRepository;
     _dataImportanteRepository       = dataImportanteRepository;
     _httpContextAccessor            = httpContextAccessor;
     _alertaRepository               = alertaRepository;
     _emailSender = emailSender;
     _membroOrganizadorRepository = membroOrganizadorRepository;
 }
Пример #17
0
 public SubmissaoController(ISubmissaoRepository submissaoRepository,
                            IParticipanteRepository participanteRepository,
                            IEventoRepository eventoRepository,
                            ITipoRepository tipoRepository,
                            IEventoParticipanteRepository eventoParticipanteRepository,
                            IWebHostEnvironment webHostEnvironment,
                            IDataImportanteRepository dataImportanteRepository,
                            IAlertaRepository alertaRepository,
                            IHttpContextAccessor httpContextAccessor,
                            IEmailSender emailSender,
                            IMembroCientificoRepository membroCientificoRepository)
 {
     _submissaoRepository          = submissaoRepository;
     _participanteRepository       = participanteRepository;
     _eventoRepository             = eventoRepository;
     _tipoRepository               = tipoRepository;
     _eventoParticipanteRepository = eventoParticipanteRepository;
     _webHostEnvironment           = webHostEnvironment;
     _dataImportanteRepository     = dataImportanteRepository;
     _alertaRepository             = alertaRepository;
     _httpContextAccessor          = httpContextAccessor;
     _emailSender = emailSender;
     _membroCientificoRepository = membroCientificoRepository;
 }
Пример #18
0
 public ParticipanteService(IParticipanteRepository participante) => _participante = participante;
 public ParticipanteService(IParticipanteRepository repositorio)
 {
     this.repositorio = repositorio;
 }
Пример #20
0
 public ParticipanteService(IParticipanteRepository repository)
 {
     _repository = repository;
 }
Пример #21
0
 public ParticipanteCommandHandler(IUnitOfWork uow, IBus bus, IDomainNotificationHandler <DomainNotification> notifications, IParticipanteRepository participanteRepository)
     : base(uow, bus, notifications)
 {
     _participanteRepository = participanteRepository;
     _bus = bus;
 }
Пример #22
0
 public ParticipanteService(IParticipanteRepository rep, ICache cache, CurrentUser user)
     : base(rep, cache, user)
 {
 }
 public ParticipanteServiceBase(IParticipanteRepository rep, ICache cache, CurrentUser user)
     : base(cache)
 {
     this._rep  = rep;
     this._user = user;
 }
Пример #24
0
 public ParticipanteService(ILogger <ParticipanteService> logger, IValidator <Participante> validator, IParticipanteRepository repository)
     : base(logger, validator, repository)
 {
 }
 public ParticipanteAppService(IParticipanteRepository repository, IUnitOfWork unitOfWork) : base(repository, unitOfWork)
 {
     this.repository = repository;
 }
 public ParticipanteService(IParticipanteRepository ParticipanteRepository,
                            INotificador notificador) : base(notificador)
 {
     _ParticipanteRepository = ParticipanteRepository;
 }
 public ParticipanteController(IParticipanteRepository participanteRepository,
                               UserManager <ApplicationUser> userManager)
 {
     _participanteRepository = participanteRepository;
     _userManager            = userManager;
 }
Пример #28
0
 public ParticipanteIsSuitableValidation(IParticipanteRepository rep)
 {
     //base.Add(Guid.NewGuid().ToString(), new Rule<Participante>(Instance of is suitable,"message for user"));
 }
Пример #29
0
 public ParticipanteService(IParticipanteRepository participanteRepository)
     : base(participanteRepository)
 {
     _participanteRepository = participanteRepository;
 }
Пример #30
0
        public ValorParticipanteValidator(IValorParticipanteRepository valorParticipanterepo, IParticipanteRepository participanteRepo, IEventoRepository eventoRepo)
        {
            RuleFor(o => o.IdEvento)
            .NotEmpty()
            .WithMessage("{PropertyName} é obrigatório")
            .MustAsync(async(o, cancellation) => await ExistirEvento(o))
            .WithMessage("{PropertyName} nao encontrado");

            RuleFor(o => o.IdParticipante)
            .NotEmpty()
            .WithMessage("{PropertyName} é obrigatório")
            .MustAsync(async(o, cancellation) => await ExistirParticipante(o))
            .WithMessage("{PropertyName} nao encontrado");


            RuleFor(o => new { o.IdEvento, o.IdParticipante })
            .MustAsync(async(o, cancellation) => await ConterRegistroUnico(o.IdEvento, o.IdParticipante))
            .WithMessage("Participante ja cadastrado para esse evento.")
            .OverridePropertyName("Evento e participante");

            async Task <bool> ConterRegistroUnico(int idEvento, int idParticipante)
            {
                if (idEvento.IsAnyNullOrEmpty() == true || idParticipante.IsAnyNullOrEmpty() == true)
                {
                    return(true);
                }
                var retorno = await valorParticipanterepo.FindAsync(x => x.IdParticipante == idParticipante && x.IdEvento == idEvento);

                return(retorno.IsNullOrEmpty());
            }

            async Task <bool> ExistirParticipante(int idParticipante)
            {
                if (idParticipante.IsAnyNullOrEmpty() == true || idParticipante == 0)
                {
                    return(true);
                }

                var retorno = await participanteRepo.FindAsync(x => x.Id == idParticipante);

                return(!retorno.IsNullOrEmpty());
            }

            async Task <bool> ExistirEvento(int idEvento)
            {
                if (idEvento.IsAnyNullOrEmpty() == true || idEvento == 0)
                {
                    return(true);
                }

                var retorno = await eventoRepo.FindAsync(x => x.Id == idEvento);

                return(!retorno.IsNullOrEmpty());
            }
        }