CreateDbConnection() публичный Метод

public CreateDbConnection ( ) : IDbConnection
Результат IDbConnection
Пример #1
0
        public static void AssemblyInitialize(TestContext context)
        {
            dbFactory = new OrmLiteConnectionFactory(connectionString, SqlServerOrmLiteDialectProvider.Instance);
            var dbConn = dbFactory.CreateDbConnection();

            dbConn.Open();
            // Drop & create the tables
            dbConn.DropAndCreateTable<FileBase>();
            dbConn.DropAndCreateTable<FileVersion>();
            dbConn.DropAndCreateTable<Folder>();

            //dbConn.DeleteAll<FileVersion>();
            //dbConn.DeleteAll<FileBase>();
            //dbConn.DeleteAll<Folder>();

            dbConn.Close();

            if (IO.Directory.Exists(rootFolder))
                IO.Directory.Delete(rootFolder, true);

            IO.Directory.CreateDirectory(rootFolder);
        }