I've tried to
ObjectScope.GetSqlQuery("TRUNCATE TABLE %ta开发者_运维问答ble_name%", null, null).Execute();
and
ObjectScope.GetOqlQuery("TRUNCATE TABLE %ClassName%Extent").Execute();
The first row does nothing. And the second throw Exception:
line 1:10: unexpected token: ["TABLE",<42>,line=1,col=10]
Original Query: TRUNCATE TABLE DayExtent
The method ExecuteDDLScript doesn't make a difference between DDL and DML script. It only requires that there are no open object scopes.
        IObjectScope scope = ObjectScopeProvider1.GetNewObjectScope();
        //do something here
        scope.Dispose();
        string tableToTruncate = "SOME_TABLE";
        scope.Database.GetSchemaHandler().ExecuteDDLScript(string.Format("TRUNCATE TABLE {0}", tableToTruncate));
        scope = ObjectScopeProvider1.GetNewObjectScope();
        //do something again
Hope that helps.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论