提交 | 用户 | age
|
8e1d1f
|
1 |
using DIXWeb.Entity.BasicInfo; |
A |
2 |
using DIXWeb.Entity.GlobalM; |
|
3 |
using DIXWeb.Entity.Power; |
|
4 |
using DIXWeb.Entity.Workflow; |
|
5 |
using System; |
|
6 |
using System.Collections.Generic; |
|
7 |
using System.Data.Entity; |
|
8 |
using System.Linq; |
|
9 |
using System.Text; |
|
10 |
using System.Threading.Tasks; |
|
11 |
|
|
12 |
namespace DIXWeb.DAL |
|
13 |
{ |
|
14 |
public class DBContext : DbContext |
|
15 |
{ |
|
16 |
static string _ConnectionString { get { return System.Configuration.ConfigurationManager.ConnectionStrings["DIX"].ToString(); } } |
|
17 |
//无参构造方法 |
|
18 |
public DBContext() |
|
19 |
: base(_ConnectionString) |
|
20 |
{ |
1bf8ef
|
21 |
this.Database.CommandTimeout = 5184000; |
8e1d1f
|
22 |
//关闭初始化策略(Code First连接现有数据库) |
A |
23 |
try { System.Data.Entity.Database.SetInitializer<DBContext>(null); } catch (Exception er) { throw new Exception("数据库连接失败:" + _ConnectionString + "," + er.Message); } |
|
24 |
|
|
25 |
} |
|
26 |
|
|
27 |
public DbSet<OrgInfo> OrgInfo { get; set; }//组织表 |
|
28 |
public DbSet<RoleInfo> RoleInfo { get; set; }//角色表 |
|
29 |
public DbSet<PowerInfo> PowerInfo { get; set; }//权限表 |
|
30 |
public DbSet<UserInfo> UserInfo { get; set; }//人员表 |
|
31 |
public DbSet<MenuInfo> MenuInfo { get; set; }//菜单表表 |
|
32 |
public DbSet<UserInRole> UserInRole { get; set; }//人员角色表 |
|
33 |
public DbSet<PowerInRole> PowerInRole { get; set; }//角色权限表 |
|
34 |
public DbSet<PowerInRes> PowerInRes { get; set; }//权限菜单表 |
|
35 |
|
|
36 |
|
bb6174
|
37 |
public DbSet<BillType> BillType { get; set; }//单据类型 |
1e406e
|
38 |
public DbSet<Workflows> Workflow { get; set; }//单据类型 |
8e1d1f
|
39 |
public DbSet<WorkflowNodeType> WorkflowNodeType { get; set; }//审批节点类型 |
A |
40 |
public DbSet<WorkflowNode> WorkflowNode { get; set; }//审批节点 |
|
41 |
public DbSet<WorkflowOrgType> WorkflowOrgType { get; set; }//审批节点-组织类型 |
|
42 |
public DbSet<WorkflowRoleType> WorkflowRoleType { get; set; }//审批节点-角色类型 |
15b421
|
43 |
public DbSet<WorkflowNodeDetail> WorkflowNodeDetail { get; set; }//审批节点详细 |
361c8a
|
44 |
public DbSet<WorkflowRoute> WorkflowRoute { get; set; }//审批路由 |
8e1d1f
|
45 |
|
A |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
public DbSet<DatabaseLink> _DatabaseLink { get; set; } |
|
51 |
public DbSet<Goods> _Goods { get; set; } |
|
52 |
public DbSet<WebUser> WebUser { get; set; } |
|
53 |
public DbSet<GoodSort> _GoodSort { get; set; } |
|
54 |
public DbSet<CostComputeStyle> _CostComputeStyle { get; set; } |
|
55 |
public DbSet<GoodProperty> _GoodProperty { get; set; } |
|
56 |
public DbSet<Unit> _Unit { get; set; } |
|
57 |
public DbSet<InvoiceType> _InvoiceType { get; set; } |
|
58 |
public DbSet<AccountItem> _AccountItem { get; set; } |
|
59 |
public DbSet<AccountSort> _AccountSort { get; set; } |
|
60 |
public DbSet<AlarmSetting> _AlarmSetting { get; set; } |
|
61 |
public DbSet<BOM> _BOM { get; set; } |
|
62 |
public DbSet<ViewBomDetail> _VBOM { get; set; } |
|
63 |
public DbSet<GoodUnit> _GoodUnit { get; set; } |
|
64 |
public DbSet<WorkList> _WorkList { get; set; } |
|
65 |
public DbSet<Warehouse> _Warehouse { get; set; } |
|
66 |
public DbSet<BankAccount> _BankAccount { get; set; } |
|
67 |
|
|
68 |
} |
|
69 |
} |