可以从集合对象中调用没有 return 数据的 Raw SQL 方法吗?

Can a Raw SQL method that doesn't return data be called from the collection object?

以下实体具有截断(删除)SQL 数据库中所有记录的原始方法。我希望从集合对象中调用该方法。如果不能,那不是游戏杀手,但有可能吗?

UserCollection.TruncateDatabase()

instead of

User.TruncateDatabase()

  <cf:entity name="User" namespace="Amikids.ActiveDirectoryCache" categoryPath="/Amikids.ActiveDirectoryCache">
    <cf:property name="Id" key="true" />
    <cf:property name="DirectReports" typeName="{0}.UserCollection" relationPropertyName="ReportsTo" />
    <cf:property name="ReportsTo" typeName="{0}.User" relationPropertyName="DirectReports" />
    <cf:property name="UserInfo" typeName="{0}.Lightweight.UserInfo" />
    <cf:method name="TruncateDataBase">
      <cf:body text="RAW" rawText="TRUNCATE TABLE dbo.[User]" language="tsql" />
    </cf:method>
    <cf:method name="LoadByObjectGuid" body="LOADONE(guid objectGuid) WHERE UserInfo.objectGUID = @objectGuid" />
    <cf:method name="LoadByDistinguishedName" body="LOADONE(string distinguishedName) WHERE UserInfo.DistinguishedName = @distinguishedName" />
  </cf:entity>

我想你可以使用原始删除方法:https://www.softfluent.com/Documentation/Methods_Delete.html

 <cf:entity name="User">
    <cf:method name="TruncateDataBase">
      <cf:body text="DELETE() raw" rawBody="TRUNCATE TABLE dbo.[User]" language="tsql" />
    </cf:method>
  </cf:entity>