using DIXWeb.Entity.BasicInfo;
|
using DIXWeb.Entity.GlobalM;
|
using DIXWeb.Entity.Power;
|
using DIXWeb.Entity.Workflow;
|
using System;
|
using System.Collections.Generic;
|
using System.Data.Entity;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace DIXWeb.DAL
|
{
|
public class DBContext : DbContext
|
{
|
static string _ConnectionString { get { return System.Configuration.ConfigurationManager.ConnectionStrings["DIX"].ToString(); } }
|
//无参构造方法
|
public DBContext()
|
: base(_ConnectionString)
|
{
|
this.Database.CommandTimeout = 5184000;
|
//关闭初始化策略(Code First连接现有数据库)
|
try { System.Data.Entity.Database.SetInitializer<DBContext>(null); } catch (Exception er) { throw new Exception("数据库连接失败:" + _ConnectionString + "," + er.Message); }
|
|
}
|
|
public DbSet<OrgInfo> OrgInfo { get; set; }//组织表
|
public DbSet<RoleInfo> RoleInfo { get; set; }//角色表
|
public DbSet<PowerInfo> PowerInfo { get; set; }//权限表
|
public DbSet<UserInfo> UserInfo { get; set; }//人员表
|
public DbSet<MenuInfo> MenuInfo { get; set; }//菜单表表
|
public DbSet<UserInRole> UserInRole { get; set; }//人员角色表
|
public DbSet<PowerInRole> PowerInRole { get; set; }//角色权限表
|
public DbSet<PowerInRes> PowerInRes { get; set; }//权限菜单表
|
|
|
public DbSet<BillType> BillType { get; set; }//单据类型
|
public DbSet<Workflows> Workflow { get; set; }//单据类型
|
public DbSet<WorkflowNodeType> WorkflowNodeType { get; set; }//审批节点类型
|
public DbSet<WorkflowNode> WorkflowNode { get; set; }//审批节点
|
public DbSet<WorkflowOrgType> WorkflowOrgType { get; set; }//审批节点-组织类型
|
public DbSet<WorkflowRoleType> WorkflowRoleType { get; set; }//审批节点-角色类型
|
public DbSet<WorkflowNodeDetail> WorkflowNodeDetail { get; set; }//审批节点详细
|
public DbSet<WorkflowRoute> WorkflowRoute { get; set; }//审批路由
|
|
|
|
|
|
public DbSet<DatabaseLink> _DatabaseLink { get; set; }
|
public DbSet<Goods> _Goods { get; set; }
|
public DbSet<WebUser> WebUser { get; set; }
|
public DbSet<GoodSort> _GoodSort { get; set; }
|
public DbSet<CostComputeStyle> _CostComputeStyle { get; set; }
|
public DbSet<GoodProperty> _GoodProperty { get; set; }
|
public DbSet<Unit> _Unit { get; set; }
|
public DbSet<InvoiceType> _InvoiceType { get; set; }
|
public DbSet<AccountItem> _AccountItem { get; set; }
|
public DbSet<AccountSort> _AccountSort { get; set; }
|
public DbSet<AlarmSetting> _AlarmSetting { get; set; }
|
public DbSet<BOM> _BOM { get; set; }
|
public DbSet<ViewBomDetail> _VBOM { get; set; }
|
public DbSet<GoodUnit> _GoodUnit { get; set; }
|
public DbSet<WorkList> _WorkList { get; set; }
|
public DbSet<Warehouse> _Warehouse { get; set; }
|
public DbSet<BankAccount> _BankAccount { get; set; }
|
|
}
|
}
|