BaseDbContext.cs
3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using System.Data.SqlClient;
namespace WebRepository
{
public partial class BaseDbContext: DbContext
{
public BaseDbContext(DbContextOptions<BaseDbContext> options) : base(options)
{
}
#region BaseDB
public virtual DbSet<Map> Maps { get; set; }
public virtual DbSet<MapPageContent> Map_content_tabs { get; set; }
public virtual DbSet<MapPoint> MapPoints { get; set; }
public virtual DbSet<MapStation> MapStations { get; set; }
public virtual DbSet<MapRegion> MapRegions { get; set; }
public virtual DbSet<ReportDesign> ReportDesigns { get; set; }
public virtual DbSet<SysCount> SysCounts { get; set; }
public virtual DbSet<SysDept> SysDepts { get; set; }
public virtual DbSet<SysDictData> SysDictDatas { get; set; }
public virtual DbSet<SysDictType> SysDictTypes { get; set; }
public virtual DbSet<SysInfo> SysInfos { get; set; }
public virtual DbSet<SysInterfaceLog> SysInterfaceLogs { get; set; }
public virtual DbSet<SysJob> SysJobs { get; set; }
public virtual DbSet<SysJobLog> SysJobLogs { get; set; }
public virtual DbSet<SysLoginLog> SysLoginLogs { get; set; }
public virtual DbSet<SysModule> SysModules { get; set; }
public virtual DbSet<SysModuleElement> SysModuleElements { get; set; }
public virtual DbSet<SysOperLog> SysOperLogs { get; set; }
public virtual DbSet<SysRelevance> SysRelevances { get; set; }
public virtual DbSet<SysRole> SysRoles { get; set; }
public virtual DbSet<SysUser> SysUsers { get; set; }
public virtual DbSet<SysUserOnline> SysUserOnlines { get; set; }
public virtual DbSet<TAgvGroup> TAgvGroups { get; set; }
public virtual DbSet<TTaskDesign> TTaskDesigns { get; set; }
public virtual DbSet<TTaskGroup> TTaskGroups { get; set; }
public virtual DbSet<TTaskType> TTaskTypes { get; set; }
public virtual DbSet<TTaskAssign> TTaskAssigns { get; set; }
public virtual DbSet<SysI18nTable> SysI18nTables { get; set; }
public virtual DbSet<SysI18nText> SysI18nTexts { get; set; }
public virtual DbSet<AcsWorkstation> AcsWorkstations { get; set; }
public virtual DbSet<AcsZone> AcsZones { get; set; }
public virtual DbSet<AcsZoneRelevance> AcsZoneRelevances { get; set; }
public virtual DbSet<AcsTaskFrom> AcsTaskStartzones { get; set; }
public virtual DbSet<AcsTaskType> AcsTaskTypes { get; set; }
public virtual DbSet<AcsTask> AcsTasks { get; set; }
public virtual DbSet<AcsTaskHis> AcsTaskHises { get; set; }
#endregion
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
// [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
modelBuilder.Entity<SysCount>().HasKey(c => c.Type);
modelBuilder.Entity<SysCount>().Property(c => c.Type).HasColumnName("Type");
}
}
}