最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
给你个例子[.NET中三层构架开发实例 - 用户注册系统]
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
数据库基类
using System;
using System.Data;
using System.Data.SqlClient;
namespace HaiSky.HtJob
{
///
/// DbClass 的摘要说明。
///
public class DbClass
{
private string connectionString;
protected SqlConnection Connection;
public DbClass(string newConnectionString)
{
connectionString = newConnectionString;
Connection = new SqlConnection(connectionString);
}
public string ConnectionString
{
get
{
return connectionString;
}
}
private SqlCommand BuildQueryCommand(string storedProcName,IDataParameter[] parameters)
{
SqlCommand command = new SqlCommand(storedProcName,Connection);
command.CommandType = CommandType.StoredProcedure;
using System;
using System.Data;
using System.Data.SqlClient;
namespace HaiSky.HtJob
{
///
/// DbClass 的摘要说明。
///
public class DbClass
{
private string connectionString;
protected SqlConnection Connection;
public DbClass(string newConnectionString)
{
connectionString = newConnectionString;
Connection = new SqlConnection(connectionString);
}
public string ConnectionString
{
get
{
return connectionString;
}
}
private SqlCommand BuildQueryCommand(string storedProcName,IDataParameter[] parameters)
{
SqlCommand command = new SqlCommand(storedProcName,Connection);
command.CommandType = CommandType.StoredProcedure;
相关文章
- SpringBoot测试配置属性与web启动环境解析 10-24
- vue中将el-switch值true、false改为number类型的1和0解析 10-24
- Vue中的路由配置项meta使用解读 10-24
- SpringBoot自定义bean绑定解析 10-24
- SpringBoot常用计量与bean属性校验和进制数据转换规则解析 10-24
- 工厂方法在Spring框架中的运用介绍 10-24