DataCenterContext.Context.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // 此代码已从模板生成。
  4. //
  5. // 手动更改此文件可能导致应用程序出现意外的行为。
  6. // 如果重新生成代码,将覆盖对此文件的手动更改。
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. namespace EMIS.Entities.DataCenter
  10. {
  11. using System;
  12. using System.Data.Entity;
  13. using System.Data.Entity.Infrastructure;
  14. public partial class DataCenterContextContainer : DbContext
  15. {
  16. public DataCenterContextContainer()
  17. : base("name=DataCenterContextContainer")
  18. {
  19. var objectContext = (this as IObjectContextAdapter).ObjectContext;
  20. objectContext.CommandTimeout = 12000;
  21. base.Configuration.ProxyCreationEnabled = false;
  22. }
  23. static DataCenterContextContainer()
  24. {
  25. Database.SetInitializer<DataCenterContextContainer>(null);
  26. }
  27. public DataCenterContextContainer(string nameOrConnectionString) : base(nameOrConnectionString) {
  28. var objectContext = (this as IObjectContextAdapter).ObjectContext;
  29. objectContext.CommandTimeout = 12000;
  30. base.Configuration.ProxyCreationEnabled = false;
  31. }
  32. protected override void OnModelCreating(DbModelBuilder modelBuilder)
  33. {
  34. throw new UnintentionalCodeFirstException();
  35. }
  36. public virtual DbSet<XB_BJDM> XB_BJDM { get; set; }
  37. public virtual DbSet<XB_BXZY> XB_BXZY { get; set; }
  38. public virtual DbSet<XB_DWBM> XB_DWBM { get; set; }
  39. public virtual DbSet<XS_LXXX> XS_LXXX { get; set; }
  40. public virtual DbSet<XS_XJYD> XS_XJYD { get; set; }
  41. public virtual DbSet<XS_XSJBXX> XS_XSJBXX { get; set; }
  42. }
  43. }