Пример #1
0
        // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();

            services.AddSingleton<IBuildRepository, BuildTestRepository>();
            services.AddSingleton<IPlayerRepository, PlayerTestRepository>();
            DB.Connection db = new DB.Connection();
            db.StartConnect();
        }
Пример #2
0
        public void StartConnect()
        {
            connection = new MySqlConnection(connectionString);

            connection.Open();
            Current = this;
        }