예제 #1
0
 public DataSeeder(FFDbContext _ctx)
 {
     playerSvc     = new PlayerService(_ctx);
     clubSvc       = new ClubService(_ctx);
     teamSvc       = new TeamService(_ctx);
     userSvc       = new UserService(_ctx);
     teamPlayerSvc = new TeamPlayerService(_ctx);
     playerSvc.Initialize();
 }
 public TeamPlayerServiceTest()
 {
     svc       = new TeamPlayerService();
     playerSvc = new PlayerService();
     teamSvc   = new TeamService();
     userSvc   = new UserService();
     //Restore test data to DB before each test
     svc.Initialize();
 }
예제 #3
0
 public DataSeeder()
 {
     playerSvc     = new PlayerService(FFDbContextFactory.CreateCtx());
     clubSvc       = new ClubService(FFDbContextFactory.CreateCtx());
     teamSvc       = new TeamService(FFDbContextFactory.CreateCtx());
     userSvc       = new UserService(FFDbContextFactory.CreateCtx());
     teamPlayerSvc = new TeamPlayerService(FFDbContextFactory.CreateCtx());
     playerSvc.Initialize();
 }
예제 #4
0
 public IndexModel(ITeamPlayerService teamPlayerService)
 {
     _teamPlayerService = teamPlayerService;
 }
예제 #5
0
 //Constructor using Dependancy Injection
 public IndexModel(ApplicationDbContext context, ITeamPlayerService teamPlayerService) : base(context)
 {
     _teamPlayerService = teamPlayerService;
 }
예제 #6
0
 public TeamPlayerController(ITeamPlayerService service)
 {
     _service = service;
 }
예제 #7
0
        //public string Message;

        public IndexModel(KSCApp.Data.ApplicationDbContext context, ITeamPlayerService teamPlayerService, IConfiguration configuration) : base(context)
        {
            _teamPlayerService = teamPlayerService;
            _configuration     = configuration;
        }