Ejemplo n.º 1
0
        public static void Init(TestContext context)
        {
            var configuration = new ConfigurationBuilder()
                                .AddUserSecrets(Assembly.GetExecutingAssembly(), optional: true)
                                .AddEnvironmentVariables()
                                .Build();

            string connectionString = configuration.GetConnectionString("TestDatabase");

            DatabaseConfiguration.SetDefaultConnectionString(connectionString);

            var connectionString2 = configuration.GetConnectionString("Customers");

            DatabaseConfiguration.AddMappedConnectionString("Sushi.MicroORM.Tests.DAL.Customers", connectionString2);

            var connectionString3 = configuration.GetConnectionString("Addresses");

            DatabaseConfiguration.AddMappedConnectionString(typeof(DAL.Customers.Address), connectionString3);
        }