本文整理汇总了C#中StoredProcedure.AddParam方法的典型用法代码示例。如果您正苦于以下问题:C# StoredProcedure.AddParam方法的具体用法?C# StoredProcedure.AddParam怎么用?C# StoredProcedure.AddParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StoredProcedure
的用法示例。
在下文中一共展示了StoredProcedure.AddParam方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadSP
private StoredProcedure LoadSP( StoredProcedure storedProcedure )
{
storedProcedure.AddParam( "liUrlCacheID", this.UrlCacheID );
storedProcedure.AddParam( "sUrl", this.Url );
storedProcedure.AddParam( "sContents", this.Contents );
storedProcedure.AddParam( "sDomain", this.Domain );
storedProcedure.AddParam( "sParameters", this.ParameterString );
storedProcedure.AddParam( "sRequestVerb", this.RequestVerbString );
return storedProcedure;
}
示例2: Update
protected void Update()
{
using ( Database db = new Database( ))
{
StoredProcedure storedProcedure = new StoredProcedure( "UpdateUrlCache" );
LoadSP( storedProcedure );
storedProcedure.AddParam( "dtLastUpdated", DateTime.Now );
db.Get( storedProcedure ).Close();
}
}
示例3: Load
protected void Load( int UrlCacheID )
{
using (Database db = new Database( ))
{
StoredProcedure storedProcedure = new StoredProcedure( "GetUrlCacheByID" );
storedProcedure.AddParam( "liUrlCacheID", UrlCacheID );
System.Data.SqlClient.SqlDataReader rs = db.Get( storedProcedure );
while ( rs.Read() )
LoadRS ( rs );
rs.Close();
}
}
示例4: Delete
protected void Delete()
{
using ( Database db = new Database( ))
{
StoredProcedure storedProcedure = new StoredProcedure( "DeleteUrlCache" );
storedProcedure.AddParam( "liUrlCacheID", this.UrlCacheID );
db.Get( storedProcedure ).Close();
}
}