using System.Data.Entity.ModelConfiguration; using System.ComponentModel.DataAnnotations.Schema; namespace CAPI.Custom.Entities { public partial class QuoteItemPriceCheck { public class QuoteItemPriceCheckMapping : EntityTypeConfiguration { public QuoteItemPriceCheckMapping() { ToTable("quotes_QuoteItemPriceChecks"); HasKey(p => p.recId); Property(p => p.CreatedDate).HasColumnName("CreatedDate"); Property(p => p.CreatedDateUtc).HasColumnName("CreatedDateUtc"); Property(p => p.OriginalSellPrice).HasColumnName("OriginalSellPrice"); Property(p => p.PreviousQuoteItemId).HasColumnName("PreviousQuoteItemId"); Property(p => p.PriceCheckTypeId).HasColumnName("PriceCheckType"); Property(p => p.QuoteDate).HasColumnName("QuoteDate"); Property(p => p.QuoteItemRecId).HasColumnName("QuoteItemRecId"); Property(p => p.QuoteNumber).HasColumnName("QuoteNumber"); Property(p => p.recId).HasColumnName("recId"); Property(p => p.SellPrice).HasColumnName("SellPrice"); Ignore(p => p.CheckType); HasRequired(p => p.QuoteItem) .WithMany(q => q.PriceChecks) .HasForeignKey(p => p.QuoteItemRecId); } } } }