Beispiel #1
0
 public static void Init()
 {
     DbFact = new DatabaseFactory();
     var config = FluentMappingConfiguration.Scan(x =>
                                                  	{
                                                  		x.TheCallingAssembly();
                                                  		x.WithSmartConventions(true);
                                                         x.Columns.IgnoreWhere(y => y.GetCustomAttributes(typeof(IgnoreAttribute), true).Any());
                                                  		x.OverrideMappingsWith(new OverrideNPoco());
                                                  	});
     DbFact.Config().WithFluentConfig(config);
 }
Beispiel #2
0
        public void Setup()
        {
            var dbfactory = new DatabaseFactory();
            dbfactory
                .Config()
                .UsingDatabase(() => new Database("", DatabaseType.SqlServer2012, SqlClientFactory.Instance))
                .WithFluentConfig(FluentMappingConfiguration.Configure(new MyMappings()));

            _database = dbfactory.GetDatabase();
        }