protected override NorthwindDatabase CreateDataContext() { return(new MySqlNorthwind(MySqlNorthwind.CreateConnection("root", "test", "Northwind", NorthwindDatabase.DB_HOST, 3306).ConnectionString) { Log = Console.Out }); }
public void LicenseTest2() { var access = new ALinq.DataContext("C:/Northwind.mdb", typeof(ALinq.Access.AccessDbProvider)) { Log = Console.Out }; var q = access.GetTable <Customer>().ToList(); var sqlLite = new ALinq.DataContext("C:/Northwind.db3", typeof(ALinq.SQLite.SQLiteProvider)) { Log = Console.Out }; q = sqlLite.GetTable <Customer>().ToList(); var conn = MySqlNorthwind.CreateConnection("root", "test", "Northwind", NorthwindDatabase.DB_HOST, 3306).ConnectionString; var mysql = new ALinq.DataContext(conn, typeof(ALinq.MySQL.MySqlProvider)) { Log = Console.Out }; q = mysql.GetTable <Customer>().ToList(); conn = OracleNorthwind.CreateConnection("Northwind", "test", "vpc1").ConnectionString; var oracle = new ALinq.DataContext(conn, typeof(ALinq.Oracle.OracleProvider)) { Log = Console.Out }; q = oracle.GetTable <Customer>().ToList(); conn = OdpOracleNorthwind.CreateConnection("Northwind", "test", "vpc1").ConnectionString; var odpOracle = new ALinq.DataContext(conn, typeof(ALinq.Oracle.Odp.OracleProvider)) { Log = Console.Out }; q = oracle.GetTable <Customer>().ToList(); conn = "User=SYSDBA;Password=masterkey;Database=Northwind;DataSource=vpc1;ServerType=0"; var firebird = new ALinq.DataContext(conn, typeof(ALinq.Firebird.FirebirdProvider)) { Log = Console.Out }; q = firebird.GetTable <Customer>().ToList(); conn = "DataBase=SAMPLE;USER ID=db2admin;Password=test;Server=VPC1"; var db2 = new ALinq.DataContext(conn, typeof(ALinq.DB2.DB2Provider)) { Log = Console.Out }; q = db2.GetTable <Customer>().ToList(); }
public void TestInitialize() { var xmlMapping = XmlMappingSource.FromStream(typeof(SQLiteTest).Assembly.GetManifestResourceStream("Test.Northwind.Access.map")); //db = new AccessNorthwind("C:/Northwind.mdb"); //db = new AccessNorthwind("C:/Northwind.mdb", xmlMapping); //db = new SQLiteNorthwind("C:/Northwind.db3"); db = new MySqlNorthwind(MySqlNorthwind.CreateConnection("root", "test", "Northwind", "localhost", 3306).ConnectionString); db.Log = Console.Out; }
public void LicenseTest1() { var access = new MyDataContext("C:/Northwind.mdb", typeof(ALinq.Access.AccessDbProvider)); var q = access.GetTable <Customer>().ToList(); var sqlLite = new MyDataContext("C:/Northwind.db3", typeof(ALinq.SQLite.SQLiteProvider)); q = sqlLite.GetTable <Customer>().ToList(); var conn = MySqlNorthwind.CreateConnection("root", "test", "Northwind", NorthwindDatabase.DB_HOST, 3306).ConnectionString; //var mysql = new MyDataContext(conn, typeof(ALinq.MySQL.MySqlProvider)); //q = mysql.GetTable<Customer>().ToList(); conn = OracleNorthwind.CreateConnection("Northwind", "test", "vpc1").ConnectionString; var oracle = new MyDataContext(conn, typeof(ALinq.Oracle.OracleProvider)); q = oracle.GetTable <Customer>().ToList(); conn = OdpOracleNorthwind.CreateConnection("Northwind", "test", "vpc1").ConnectionString; var odpOracle = new MyDataContext(conn, typeof(ALinq.Oracle.Odp.OracleProvider)); q = oracle.GetTable <Customer>().ToList(); conn = "User=SYSDBA;Password=masterkey;Database=Northwind;DataSource=vpc1;ServerType=0"; var firebird = new MyDataContext(conn, typeof(ALinq.Firebird.FirebirdProvider)); q = firebird.GetTable <Customer>().ToList(); //conn = "DataBase=SAMPLE;USER ID=db2admin;Password=test;Server=VPC1"; //var db2 = new MyDataContext(conn, typeof(ALinq.DB2.DB2Provider)); //q = db2.GetTable<Customer>().ToList(); //conn = "HOST=VPC1;User ID=postgres;PASSWORD=test;DATABASE=northwind"; //var pgsql = new MyDataContext(conn, typeof(ALinq.PostgreSQL.PgsqlProvider)); //pgsql.Connection.Open(); //q = pgsql.GetTable<Customer>().ToList(); }
protected DbConnection CreateConnection() { //throw new NotImplementedException(); return(MySqlNorthwind.CreateConnection("root", "test", "Northwind", "localhost", 3306)); }