本文整理汇总了C#中Db.Execute方法的典型用法代码示例。如果您正苦于以下问题:C# Db.Execute方法的具体用法?C# Db.Execute怎么用?C# Db.Execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db
的用法示例。
在下文中一共展示了Db.Execute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GivenDb_WhenOnPrepareIsConfigured__AndExecuteIsCalled_CommandIsPrepared
public void GivenDb_WhenOnPrepareIsConfigured__AndExecuteIsCalled_CommandIsPrepared()
{
var fakeConnection = new FakeConnection();
var db = new Db(fakeConnection, new DbConfig(c => ((FakeCommand)c).Comment = "PREPARED", MappingConvention.OracleStyle, string.Empty));
db.Execute("");
Assert.AreEqual("PREPARED", fakeConnection.Commands.Single().Comment);
}
示例2: DbxReset
//https://devi.kidspb.com/dbx/(EztAaAmjrEGNN42SfZ~yMQBO)/geteq?{%22type%22:%22patientPicture%22,%22locate%22:{%22patient%22:[%22patient$hZpAnYTqR2RYOwVd!OgyQJ!41D%22]}}
public void DbxReset()
{
var Q = new Db("DELETE FROM [obj] WHERE [type]='test' OR [type] = 'testAccess' OR [type] = 'testTrigger' OR [type] = 'testLink'");
Q.Execute();
Q.Dispose();
// Reset index
Dbx.Initialize();
}
示例3: GivenDb_WhenNoSpecificConfigure__AndExecuteIsCalled_UsesDefaultConfig
public void GivenDb_WhenNoSpecificConfigure__AndExecuteIsCalled_UsesDefaultConfig()
{
var fakeConnection = new FakeConnection();
var db = new Db(fakeConnection, DbConfig.Default);
db.Execute("");
}