public NovaQuery(INovaDb db, NovaTable table, string tableName, string action, string identity = null) { _db = db; _table = table; _tableName = tableName; _action = action; _identity = identity; }
public NovaQuery(INovaDb db, NovaTable table, INovaQuery tableQuery, string action, string identity = null) { _db = db; _table = table; _tableName = tableQuery.BuildString(); _queryTable = true; _action = action; _identity = identity; }
public void Init() { SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder(); csb.InitialCatalog = "TestDB"; csb.Password = "******"; csb.UserID = "sa"; csb.DataSource = "localhost"; _sut = new NovaDb(csb.ToString()); if (_sut.TableExists(_testTable)) { _sut.Drop(_testTable).Execute(); } _sut.Create(_testTable) .Column("id", "int IDENTITY(1,1)") .Column("col1", "integer", false) .Column("col2", "nvarchar(255)", false) .Execute(); _table = _sut.Table(_testTable, "id"); }