在c#中bll项目里面的封装业务逻辑类如何引用dal项目,代码详细一点,谢谢!
展开全部
Bll添加Dal的引用
namespace Compact.BLL
{
/// <summary>
/// Users
/// </summary>
public partial class Users
{
private readonly Compact.DAL.Users dal=new Compact.DAL.Users();
public Users()
{}
#region Method
/// <summary>
/// 得到最大ID
/// </summary>
public int GetMaxId()
{
return dal.GetMaxId();
}
}
}
namespace Compact.DAL
{
/// <summary>
/// 数据访问类:Users
/// </summary>
public partial class Users
{
public Users()
{}
#region Method
/// <summary>
/// 得到最大ID
/// </summary>
public int GetMaxId()
{
return DbHelperSQL.GetMaxID("User_id", "Users");
}
}
}
namespace Compact.BLL
{
/// <summary>
/// Users
/// </summary>
public partial class Users
{
private readonly Compact.DAL.Users dal=new Compact.DAL.Users();
public Users()
{}
#region Method
/// <summary>
/// 得到最大ID
/// </summary>
public int GetMaxId()
{
return dal.GetMaxId();
}
}
}
namespace Compact.DAL
{
/// <summary>
/// 数据访问类:Users
/// </summary>
public partial class Users
{
public Users()
{}
#region Method
/// <summary>
/// 得到最大ID
/// </summary>
public int GetMaxId()
{
return DbHelperSQL.GetMaxID("User_id", "Users");
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询