📄 servicedcomponent.cs
字号:
using System;
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;
namespace infoWeb.WebModules.Data
{
public abstract class ServicedDbObject : ServicedComponent
{
protected SqlConnection Connection;
private string connectionString;
protected string ConnectionString
{
get
{
return connectionString;
}
}
// place all of the helper methods from DbObject here.
protected override void Construct( string constructString )
{
connectionString = constructString;
}
protected override void Activate()
{
Connection = new SqlConnection( connectionString );
}
protected override void Deactivate()
{
Connection = null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -