Exemplo n.º 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();
        }
Exemplo n.º 2
0
        public void StartConnect()
        {
            connection = new MySqlConnection(connectionString);

            connection.Open();
            Current = this;
        }