public void TestDelimitedTableNameWithSpaces()
        {
            ClassDef.ClassDefs.Clear();
            TestAutoInc.LoadClassDefWithAutoIncrementingID();
            TestAutoInc bo = new TestAutoInc();
            ClassDef.ClassDefs[typeof (TestAutoInc)].TableName = "test autoinc";

            DeleteStatementGenerator gen = new DeleteStatementGenerator(bo, DatabaseConnection.CurrentConnection);
            var statementCol = gen.Generate();
            ISqlStatement statement = statementCol.First();
            StringAssert.Contains("`test autoinc`", statement.Statement.ToString());
        }
 /// <summary>
 /// Builds a "delete" sql statement list for this object
 /// </summary>
 /// <returns>Returns a collection of sql statements</returns>
 private IEnumerable<ISqlStatement> GetDeleteSql()
 {
     DeleteStatementGenerator generator = new DeleteStatementGenerator(BusinessObject, _databaseConnection);
     return generator.Generate();
 }
Esempio n. 3
0
        /// <summary>
        /// Builds a "delete" sql statement list for this object
        /// </summary>
        /// <returns>Returns a collection of sql statements</returns>
        private IEnumerable <ISqlStatement> GetDeleteSql()
        {
            DeleteStatementGenerator generator = new DeleteStatementGenerator(BusinessObject, _databaseConnection);

            return(generator.Generate());
        }