Exemple #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var connectionFactory = new ConnectionFactory();

            var lotteryGameRepository = new LotteryGameRepository(connectionFactory);
            var drawRepository        = new DrawRepository(connectionFactory);
            var drawService           = new DrawService(drawRepository);
            var lotteryWindow         = new LotteryWindow(lotteryGameRepository, drawRepository, drawService);

            lotteryWindow.Show();
        }
Exemple #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var context = new LotteryContext();

            context.CreateOrUpdateDatabase();

            var lotteryGameRepository = new LotteryGameRepository(context);
            var drawRepository        = new DrawRepository(context);
            var drawService           = new DrawService(drawRepository);
            var lotteryWindow         = new LotteryWindow(lotteryGameRepository, drawRepository, drawService);

            lotteryWindow.Show();
        }