Example #1
0
        public TaskTypeRepository()
        {
            //TODO: Antipattern
            var factory = new WebdimensionDbContextFactory();

            db = factory.CreateDbContext(new string[] {});
        }
Example #2
0
        public DatabaseFixture()
        {
            factory = new WebdimensionDbContextFactory();
            var db = GetNewWebdimensionContext();

            if (factory.IsInMemoryDb())
            {
                // Memória db
                db.Database.EnsureCreated();
            }
            else
            {
                // csak file DBban
                db.Database.Migrate();
            }
        }