public void SetUp() { Configurator = new AntlerConfigurator(); var connectionString = ConfigurationManager.AppSettings["ConnectionString"]; Configurator.UseWindsorContainer() .UseStorage(EntityFrameworkStorage.Use.WithConnectionString(connectionString) .WithMappings(From.AssemblyWithType <CountryMap>().First()) .WithRecreatedDatabase(true), "JustToGenerateStuff") .UseStorage(Linq2DbStorage.Use(connectionString)); }
public void should_throw_exception() { //arrange var configurator = new AntlerConfigurator(); //act configurator.UseBuiltInContainer() .UseStorage( NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory()) .WithMappings(From.AssemblyWithType <CountryMap>().First()), "Super") . UseStorage( NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory()) .WithMappings(From.AssemblyWithType <CountryMap>().First()), "Super"); }
public void SetUp() { Configurator = new AntlerConfigurator(); var connectionString = ConfigurationManager.AppSettings["ConnectionString"]; var assemblyWithMappings = From.AssemblyWithType <CountryMap>().First(); Configurator.UseStructureMapContainer() .UseStorage(typeof(T) == typeof(LazyLoading) ? EntityFrameworkStorage.Use.WithConnectionString(connectionString) .WithMappings(assemblyWithMappings).WithRecreatedDatabase(true) : EntityFrameworkStorage.Use.WithoutLazyLoading() .WithConnectionString(connectionString) .WithMappings(assemblyWithMappings).WithRecreatedDatabase(true)); }
public void SetUp() { Configurator = new AntlerConfigurator(); const string connectionString = "Data Source=TestDB.sdf"; var assemblyWithMappings = From.AssemblyWithType <CountryMap>().First(); Configurator.UseWindsorContainer() .UseStorage(typeof(T) == typeof(LazyLoading) ? EntityFrameworkPlusSqlCe.Use.WithConnectionString(connectionString) .WithMappings(assemblyWithMappings).WithRecreatedDatabase(true) : EntityFrameworkPlusSqlCe.Use.WithoutLazyLoading() .WithConnectionString(connectionString) .WithMappings(assemblyWithMappings).WithRecreatedDatabase(true)); }
public void SetUp() { Configurator = new AntlerConfigurator(); Configurator.UseStructureMapContainer().UseStorage(NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory()).WithMappings(From.AssemblyWithType <CountryMap>().First())); session = NewSessionForTesting.CreateNHibernateSession(Configurator, typeof(NHibernateStorage), UnitOfWorkSettings.Default.StorageName); }
public void SetUp() { Configurator = new AntlerConfigurator(); Configurator.UseBuiltInContainer().UseStorage(NHibernateStorage.Use.WithDatabaseConfiguration(SQLiteConfiguration.Standard.InMemory()).WithMappings(From.AssemblyWithType <CountryMap>().First())). UseStorage(EntityFrameworkPlusSqlCe.Use.WithConnectionString("Data Source=TestDB.sdf").WithMappings(From.AssemblyWithType <Antler.Specs.Shared.EntityFramework.Mappings.CountryMap>().First()).WithRecreatedDatabase(true), "Second"); nhSession = NewSessionForTesting.CreateNHibernateSession(Configurator, typeof(NHibernateStorage), UnitOfWorkSettings.Default.StorageName); }
public void SetUp() { var connectionString = ConfigurationManager.AppSettings["ConnectionString"]; Configurator = new AntlerConfigurator(); Configurator.UseWindsorContainer().UseStorage(NHibernateStorage.Use.WithDatabaseConfiguration(MsSqlConfiguration.MsSql2008.ConnectionString(connectionString)).WithCommandToTryToApplyOnServer(DbProviderFactories.GetFactory("System.Data.SqlClient"), connectionString, "CREATE DATABASE AntlerTest").WithRegeneratedSchema(true).WithMappings(From.AssemblyWithType <CountryMap>().First())); }