public TournamentController(IStadiumService stadiumService, IGameServerService gameServerService, ITournamentService tournamentService, IMapper mapper, ITeamService teamService, ITournamentTeamsService tournamentTeamsService)
 {
     _stadiumService         = stadiumService;
     _gameServerService      = gameServerService;
     _tournamentService      = tournamentService;
     _teamService            = teamService;
     _mapper                 = mapper;
     _tournamentTeamsService = tournamentTeamsService;
 }
Esempio n. 2
0
 public ClubController(
     IClubService clubService,
     ICountryService countryService,
     IStadiumService stadiumService)
 {
     this.clubService    = clubService;
     this.countryService = countryService;
     this.stadiumService = stadiumService;
 }
Esempio n. 3
0
        public StadiumServiceTests()
        {
            var configuration = new MapperConfiguration(cfg
                                                        => cfg.AddProfile <AutoMapperStadiumProfile>());

            _mapper         = new Mapper(configuration);
            _repositoryMock = new Mock <IStadiumRepository>();
            _service        = new StadiumService(_repositoryMock.Object, _mapper);
        }
 public StadiumsController(IStadiumService stadiumService,
                           ITeamService teamService,
                           IRepository <Stadium> stadiumRepository,
                           IMapper mapper)
 {
     this.mapper            = mapper;
     this.stadiumService    = stadiumService;
     this.teamService       = teamService;
     this.stadiumRepository = stadiumRepository;
 }
 public MatchController(
     IMatchService matchService,
     IClubService clubService,
     ISeasonService seasonService,
     IStadiumService stadiumService,
     IRefereeService refereeService)
 {
     this.matchService   = matchService;
     this.clubService    = clubService;
     this.seasonService  = seasonService;
     this.stadiumService = stadiumService;
     this.refereeService = refereeService;
 }
 public UsersController(
     IUnitOfWork unitOfWork, 
     IUserService userService, 
     ITeamService teamService, 
     IUserSessionService userSessionService,
     IStadiumService stadiumService
 )
 {
     _unitOfWork = unitOfWork;
     _userService = userService;
     _teamService = teamService;
     _userSessionService = userSessionService;
     _stadiumService = stadiumService;
 }
Esempio n. 7
0
        public StadiumController(IConfiguration configuration,
                                 IHostingEnvironment HostingEnvironment,
                                 ILogger <StadiumController> logger,
                                 IStadiumViewModelService stadiumViewModelService,
                                 IStadiumService StadiumService,
                                 IClubService ClubService)
        {
            _configuration = configuration;
            _HostingEnv    = HostingEnvironment;
            _logger        = logger;

            _StadiumService = StadiumService;
            _clubService    = ClubService;

            _stadiumViewModelService = stadiumViewModelService;
        }
Esempio n. 8
0
        public ClubController(IConfiguration configuration,
                              IHostingEnvironment HostingEnvironment,
                              ILogger <ClubController> logger,
                              IClubViewModelService clubViewModelService,
                              IClubService ClubService,
                              IPlayerService PlayerService,
                              IStadiumService StadiumService)
        {
            _configuration = configuration;
            _HostingEnv    = HostingEnvironment;
            _logger        = logger;

            _clubViewModelService = clubViewModelService;
            _ClubService          = ClubService;
            _PlayerService        = PlayerService;
            _StadiumService       = StadiumService;
        }
Esempio n. 9
0
 public UserController(
     IUserService user,
     IAdressesService adressesService,
     IPostalcodeService postalcodeService,
     ITeamService teamService,
     INationService nationService,
     IPlayerSkillService playskillService,
     IPlayerService playerService,
     IStadiumService stadiumService,
     ICoachService coachService,
     ICoachSkillService coachSkillService)
 {
     _usermanager        = (UserManager)user;
     _adressmanager      = (AdressManager)adressesService;
     _postalcodeManager  = (PostalcodeManager)postalcodeService;
     _teamManager        = (TeamManager)teamService;
     _nationManager      = (NationManager)nationService;
     _playerskillManager = (PlayerSkillManager)playskillService;
     _playerManager      = (PlayerManager)playerService;
     _stadiumManager     = (StadiumManager)stadiumService;
     _coachManager       = (CoachManager)coachService;
     _coachSkillManager  = (CoachSkillManager)coachSkillService;
 }
 public StadiumsController(IStadiumService stadiumService)
 {
     _stadiumService = stadiumService;
 }
 public StadiumsController(IStadiumService stadiumService)
 {
     this.stadiumService = stadiumService;
 }
Esempio n. 12
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IGameServerService gameServerService, IStadiumService stadiumService, UserManager <AppUser> _userManager, RoleManager <AppRole> _roleManager)
        {
            DBDefaultDataInitiliazer.SeedData(gameServerService, stadiumService, _userManager, _roleManager);


            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }
            app.UseHttpsRedirection();
            app.UseStaticFiles();


            app.UseRouting();
            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "Area",
                    pattern: "{area:exists}/{controller=Home}/{action=Index}/{id?}");

                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Home}/{action=Index}/{id?}");
            });
        }
Esempio n. 13
0
 public GameController(IGameService games, ITeamService teams, IStadiumService stadiums)
 {
     teamService    = teams;
     gameService    = games;
     stadiumService = stadiums;
 }
 public StadiumController(ICrudService crudService, IStadiumService stadiumService) :
     base(crudService)
 {
     _stadiumService = stadiumService;
 }
 public StadiumViewModelService(AppDbContext dbContext, IStadiumService stadiumService)
 {
     _dbContext      = dbContext;
     _stadiumService = stadiumService;
 }
 public StadiumsController(IMapper mapper,
                           IStadiumService stadiumService)
 {
     _mapper         = mapper;
     _stadiumService = stadiumService;
 }
 public GetAllStadiumsHandler(IStadiumService service)
 {
     _service = service;
 }
Esempio n. 18
0
 public StadiumController(IStadiumService StadiumServices)
 {
     _StadiumServices = StadiumServices;
 }
        public static void SeedData(IGameServerService _gameServerService, IStadiumService _stadiumService, UserManager <AppUser> _userManager, RoleManager <AppRole> _roleManager)
        {
            var gameServers = _gameServerService.GetAll();

            if (gameServers.Count <= 0)
            {
                _gameServerService.Add(new GameServerEntity {
                    ServerName = "EU Dedicated"
                });
                _gameServerService.Add(new GameServerEntity {
                    ServerName = "USA Dedicated"
                });
                _gameServerService.Add(new GameServerEntity {
                    ServerName = "Hosted Server"
                });
            }

            var stadiums = _stadiumService.GetAll();

            if (stadiums.Count <= 0)
            {
                _stadiumService.Add(new StadiumEntity {
                    Name = "Real Football"
                });
                _stadiumService.Add(new StadiumEntity {
                    Name = "Good"
                });
                _stadiumService.Add(new StadiumEntity {
                    Name = "Classic"
                });
                _stadiumService.Add(new StadiumEntity {
                    Name = "Small"
                });
                _stadiumService.Add(new StadiumEntity {
                    Name = "Real Football"
                });
                _stadiumService.Add(new StadiumEntity {
                    Name = "Small Pong"
                });
            }


            var roles = _roleManager.Roles.ToList();

            if (roles.Count <= 0)
            {
                _roleManager.CreateAsync(new AppRole {
                    Name = ConstRoles.Admin
                }).Wait();
                _roleManager.CreateAsync(new AppRole {
                    Name = ConstRoles.Member
                }).Wait();
            }


            var adminUser = _userManager.FindByNameAsync("compo").Result;

            if (adminUser == null)
            {
                AppUser user = new AppUser
                {
                    Email    = "*****@*****.**",
                    Login    = "******",
                    UserName = "******"
                };
                string pass = "******";
                _userManager.CreateAsync(user, pass).Wait();
                _userManager.AddToRoleAsync(user, ConstRoles.Admin).Wait();
            }
        }
 public StadiumController(IStadiumService stadium)
 {
     _stadiumManager = (StadiumManager)stadium;
 }
Esempio n. 21
0
 public StadiumController(IStadiumService stadiumService, ICountryService countryService)
 {
     this.stadiumService = stadiumService;
     this.countryService = countryService;
 }
Esempio n. 22
0
 public StadiumController(IStadiumService service)
 {
     _service = service;
 }
 public GetStadiumByIdHandler(IStadiumService service)
 {
     _service = service;
 }