Example #1
0
        public DBContext()
            : base("name=FilmWeb")
        {
            Database.CreateIfNotExists();

            //Database.SetInitializer(new DBInit());
        }
Example #2
0
        public DB() : base("name=DB")
        {
            Database.CreateIfNotExists();

            // NB: Må kjøres to ganger (start/stopp/start applikasjonen) når databasen ikke eksisterer
            Database.SetInitializer(new DBInit());
        }
Example #3
0
        public DB(bool shouldSeed = false)
            : base("name=Filmsite")
        {
            Database.CreateIfNotExists();

            if (shouldSeed)
            {
                Database.SetInitializer <DB>(new DBSeeder());
            }
        }
 public MusicLibraryDbContext(DbConnection connection) : base(connection, true)
 {
     Database.CreateIfNotExists();
 }
Example #5
0
 /// <summary>
 /// Konstruktøren oppretter et nytt context-instans og linker til
 /// Web.config via connectionstringen "LunaContext".
 /// </summary>
 public LunaContext() : base("name=LunaContext")
 {
     Database.CreateIfNotExists();
 }
        //

        public SalesEntities()
            : base("SalesEntities")
        {
            Database.CreateIfNotExists();
        }
Example #7
0
 public DBContext() :
     base("name=admindatabase")
 {
     Database.CreateIfNotExists();
     Database.SetInitializer(new DBInit());
 }
Example #8
0
 public DB() : base("Webfilm")
 {
     Database.CreateIfNotExists();
     Database.SetInitializer(new DBInit());
 }
Example #9
0
 public Db() : base("name=Bestilling")
 {
     Database.CreateIfNotExists();
 }
Example #10
0
 public DBContext() : base("name=GodtSkodd")
 {
     Database.CreateIfNotExists();
 }
Example #11
0
 public GlobalContext()
     : base("name=ConnectionSqlServerCe")
 {
     Database.CreateIfNotExists();
 }
Example #12
0
 public db_context() : base("name=kobling")
 {
     if (Database.CreateIfNotExists())//lager databasen. gir mulighet til å legge inn metoder
     {
     }
 }
Example #13
0
 public DBContext()
     : base("name=WebStoreDb")
 {
     Database.CreateIfNotExists();
 }
Example #14
0
 /// <summary>
 /// Ctor with db connection, required by data access layer tests
 /// </summary>
 /// <param name="connection">The database connection</param>
 public DbContextPV179(DbConnection connection) : base(connection, true)
 {
     Database.CreateIfNotExists();
 }
Example #15
0
 public VyDbContext() : base("name=VyDb")
 {
     this.Configuration.LazyLoadingEnabled = false;
     Database.CreateIfNotExists();
     Database.SetInitializer(new DbInit());
 }
Example #16
0
 public Kundecontext()
     : base("name=Kunde")
 {
     Database.CreateIfNotExists();
 }