Example #1
0
    public MySqlTest()
    {
      traceService = new TestTraceService();
      db = MySqlDb.Connect( "localhost", "Test", "root", "", configuration: new MySqlDbConfiguration() { TraceService = traceService } );
      db.T( "DROP TABLE IF EXISTS testTable" ).ExecuteNonQuery();
      db.T( @"
CREATE TABLE testTable(
Id int(11) NOT NULL,
Name varchar(50) DEFAULT NULL,
Content text,
PRIMARY KEY (Id)
)" ).ExecuteNonQuery();
    }
Example #2
0
    public SqlServerTest()
    {
      SqlServerExpress.Configuration.TraceService = traceService = new TestTraceService();
      db = SqlServerExpress.Connect( "TestDatabase" );


      db.T( "IF OBJECT_ID(N'[dbo].[Test1]') IS NOT NULL DROP TABLE [dbo].[Test1]" ).ExecuteNonQuery();
      db.T( @"
CREATE TABLE [dbo].[Test1]
(
    [ID] INT NOT NULL IDENTITY,
    [Name] NVARCHAR(50) NOT NULL , 
    [Content] NTEXT NULL, 
    [XmlContent] XML NULL,
    [Index] INT NOT NULL, 
    CONSTRAINT [PK_Test1] PRIMARY KEY ([ID]) 
)" ).ExecuteNonQuery();
    }