using System.Data.Entity; using CK.SCP.Models.ScpEntity; namespace CK.SCP.Models { public class SqlDbConfiguration : DbConfiguration { public SqlDbConfiguration() { this.SetManifestTokenResolver(new Sql2008ManifestTokenResolver()); } } public class Sql2008ManifestTokenResolver : System.Data.Entity.Infrastructure.IManifestTokenResolver { public string ResolveManifestToken(System.Data.Common.DbConnection connection) { return "2008"; } } public partial class ScpEntities : DbContext { public ScpEntities() : base("name=ScpEntities") { this.Database.CommandTimeout = 120; } public ScpEntities(string strConn) : base(strConn) { } public virtual DbSet TA_BILLTYPE { get; set; } public virtual DbSet TA_CONFIG { get; set; } public virtual DbSet TA_PART { get; set; } public virtual DbSet TB_PO_PLAN { get; set; } public virtual DbSet TB_FACTORY { get; set; } public virtual DbSet TA_VEND_PART { get; set; } public virtual DbSet TA_VENDER { get; set; } public virtual DbSet TB_ARRIVE { get; set; } public virtual DbSet TB_ARRIVE_DETAIL { get; set; } public virtual DbSet TB_INVOICE { get; set; } public virtual DbSet TB_INVOICE_DETAIL { get; set; } public virtual DbSet TB_RECEIVE { get; set; } public virtual DbSet TB_RECEIVE_DETAIL { get; set; } public virtual DbSet TB_REJECT { get; set; } public virtual DbSet TB_REJECT_DETAIL { get; set; } public virtual DbSet TA_FACTORY_CONFIG { get; set; } public virtual DbSet TL_BASEDATA { get; set; } public virtual DbSet TL_BILL { get; set; } public virtual DbSet TL_OPER { get; set; } public virtual DbSet TS_BARCODE { get; set; } public virtual DbSet TS_STOCK { get; set; } public virtual DbSet TS_UNI_API { get; set; } public virtual DbSet TS_UNI_API_HIS { get; set; } public virtual DbSet TT_CURRENCY { get; set; } public virtual DbSet TT_PROJECT { get; set; } public virtual DbSet TT_UNIT { get; set; } public virtual DbSet V_ReceiveReport { get; set; } public virtual DbSet V_PlanMonth { get; set; } public virtual DbSet TB_PlanMonth { get; set; } public virtual DbSet V_Stock { get; set; } public virtual DbSet V_INFO { get; set; } public virtual DbSet TA_Info { get; set; } public virtual DbSet TB_PublicData { get; set; } public virtual DbSet TA_BillNoType { get; set; } public virtual DbSet TA_VEND_USER { get; set; } public virtual DbSet TA_Part_User { get; set; } public virtual DbSet TA_REVICE_PORT { get; set; } public virtual DbSet TB_PENING_ITEMS { get; set; } public virtual DbSet TB_ASK { get; set; } public virtual DbSet V_TB_ASK { get; set; } public virtual DbSet TB_ASK_DETAIL { get; set; } public virtual DbSet V_TB_ASK_DETAIL { get; set; } public virtual DbSet TB_PO { get; set; } public virtual DbSet TB_PO_DETAIL { get; set; } public virtual DbSet TB_ASN { get; set; } public virtual DbSet TB_ASN_DETAIL { get; set; } public virtual DbSet TB_ADDRESS { get; set; } public virtual DbSet V_TB_PO { get; set; } public virtual DbSet V_TB_PO_DETAIL { get; set; } public virtual DbSet V_TB_PO_DETAIL_CQ { get; set; } public virtual DbSet V_TB_ASN { get; set; } public virtual DbSet V_TB_ASN_DETAIL { get; set; } public virtual DbSet TA_LANGUAGE { get; set; } public virtual DbSet TA_LOGINNUMBER { get; set; } public virtual DbSet TB_CONTRACT { get; set; } public virtual DbSet TB_CONTRACT_DETAIL { get; set; } public virtual DbSet TB_CONTRACT_DETAIL_PRICE { get; set; } public virtual DbSet V_TB_RECEIVE { get; set; } public virtual DbSet V_TB_RECEIVE_DETAIL { get; set; } public virtual DbSet V_TB_ARRIVE { get; set; } public virtual DbSet V_TB_ARRIVE_DETAIL { get; set; } public virtual DbSet V_TB_REJECT { get; set; } public virtual DbSet V_TB_REJECT_DETAIL { get; set; } public virtual DbSet TS_BARCODE_RULE { get; set; } public virtual DbSet V_TB_INVOICE_DETAIL { get; set; } public virtual DbSet V_TB_INVOICE { get; set; } //public virtual DbSet V_TB_INVOICE_DETAIL_RED { get; set; } //public virtual DbSet V_TB_INVOICE_RED { get; set; } public virtual DbSet V_TB_RECEIVE_LIST { get; set; } public virtual DbSet TB_PRINT_COUNT { get; set; } public virtual DbSet V_TB_ASN_DETAIL_VIEW { get; set; } //public virtual DbSet xxqad_vd_mstr { get; set; } public virtual DbSet V_TA_VENDER { get; set; } public virtual DbSet V_TB_INCOMPLETE_ASK { get; set; } public virtual DbSet V_TB_INCOMOLETE_DETAIL { get; set; } public virtual DbSet V_TB_PALLET_DETAIL { get; set; } public virtual DbSet V_TB_PALLET { get; set; } public virtual DbSet TB_PALLET_DETAIL { get; set; } public virtual DbSet TB_PALLET { get; set; } public virtual DbSet TB_PALLETS { get; set; } public virtual DbSet TB_QUALITY { get; set; } public virtual DbSet V_TB_QUALITY { get; set; } public virtual DbSet V_TB_RETURN { get; set; } public virtual DbSet TB_RETURN { get; set; } public virtual DbSet V_TB_INVOICE_ASK { get; set; } public virtual DbSet V_TB_ASK_DETAIL_PACKAGE { get; set; } public virtual DbSet TS_BARCODE_RULE_CUSTOM { get; set; } public virtual DbSet TS_BARCODE_CUSTOM { get; set; } public virtual DbSet V_TA_VEND_PART { get; set; } public virtual DbSet TB_PRICE { get; set; } public virtual DbSet V_TB_PRICE { get; set; } public virtual DbSet V_TB_PRICE_TemporaryPrice { get; set; } public virtual DbSet TB_FORECAST { get; set; } public virtual DbSet V_TB_PRICE_DETAIL { get; set; } public virtual DbSet V_TB_FORECAST { get; set; } public virtual DbSet TA_MoldSharing { get; set; } public virtual DbSet V_TA_MOLDSHARING { get; set; } public virtual DbSet TA_MoldSharing_Invoice { get; set; } public virtual DbSet TB_RECEIVE_QAD { get; set; } public virtual DbSet TB_RECEIVE_DETAIL_QAD { get; set; } public virtual DbSet TM_HYANTOLIN_REVIEW { get; set; } public virtual DbSet TB_CLAIM_APPEND { get; set; } public virtual DbSet V_TM_HYANTOLIN_REVIEW { get; set; } public virtual DbSet V_TB_PO_PLAN_DETAIL { get; set; } public virtual DbSet TB_PO_PLAN_EXTEND { get; set; } public virtual DbSet V_TB_PO_PLAN_EXTEND { get; set; } public virtual DbSet V_TB_ASK_RECEIVE { get; set; } public virtual DbSet TB_ASK_RECEIVE { get; set; } public virtual DbSet TB_UNCOMPLETE_TEMPASK { get; set; } public virtual DbSet V_TB_ASK_DETAIL_PO { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Entity() .Property(e => e.PORT_NO) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.Sep) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.State) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.VendPackQty) .HasPrecision(18, 2); modelBuilder.Entity() .Property(e => e.Amt) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.Amt) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.VendAbbCode) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.PackQty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.ReceivedQty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.PackQty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.AskQty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.PackQty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.Qty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.StdCost) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.PurCost) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.LogType) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.DataType) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.LogType) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.BarCode) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.FullBarCode) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.PartCode) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.VendPartCode) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.Batch) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.ProduceDate) .HasPrecision(3); modelBuilder.Entity() .Property(e => e.SerialNum) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.Qty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.BillNum) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.VendId) .IsUnicode(false); modelBuilder.Entity() .Property(e => e.PackQty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.Qty) .HasPrecision(19, 2); modelBuilder.Entity() .Property(e => e.Qty) .HasPrecision(18, 2); modelBuilder.Entity() .Property(e => e.Qty) .HasPrecision(18,5); modelBuilder.Entity() .Property(e => e.Qty) .HasPrecision(18, 2); modelBuilder.Entity() .Property(e => e.Price) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.TaxAmt) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.Tax) .HasPrecision(18, 2); modelBuilder.Entity() .Property(e => e.PackQty) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.Rate) .HasPrecision(18, 5); modelBuilder.Entity() .Property(e => e.CurAmt) .HasPrecision(18, 5); } } }