You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Data.Entity;
|
|
|
|
|
|
using System.Data.Entity.ModelConfiguration;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ReportTemplateTool.Models
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class LisDbContext : DbContext
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public LisDbContext() : base("name=MyConnectionString")
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<DictReport> DictReport { get; set; }
|
|
|
|
|
|
public virtual DbSet<DictUser> DictUser { get; set; }
|
|
|
|
|
|
public virtual DbSet<DictReportFile> DictReportFile { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
|
|
|
|
|
{
|
|
|
|
|
|
modelBuilder.Entity<DictReport>()
|
|
|
|
|
|
.ToTable("Dict_Report");
|
|
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<DictUser>()
|
|
|
|
|
|
.ToTable("Dict_User");
|
|
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<DictReportFile>()
|
|
|
|
|
|
.ToTable("Dict_ReportFile");
|
|
|
|
|
|
|
|
|
|
|
|
Database.SetInitializer<LisDbContext>(null); // 禁用初始化器
|
|
|
|
|
|
Database.Log = Console.WriteLine;
|
|
|
|
|
|
|
|
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|