using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace IntegrationTests.Models.Mapping { public class VW_Expenditure2CalculationMap : EntityTypeConfiguration { public VW_Expenditure2CalculationMap() { // Primary Key this.HasKey(t => new { t.Id, t.ParentId }); // Properties this.Property(t => t.CGEFX) .IsFixedLength() .HasMaxLength(10); this.Property(t => t.ExpenditureName) .HasMaxLength(200); // Table & Column Mappings this.ToTable("VW_Expenditure2Calculation"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.ExpenditureCategoryID).HasColumnName("ExpenditureCategoryID"); this.Property(t => t.GLId).HasColumnName("GLId"); this.Property(t => t.UOMId).HasColumnName("UOMId"); this.Property(t => t.Type).HasColumnName("Type"); this.Property(t => t.UseType).HasColumnName("UseType"); this.Property(t => t.CGEFX).HasColumnName("CGEFX"); this.Property(t => t.SortOrder).HasColumnName("SortOrder"); this.Property(t => t.SystemAttributeOne).HasColumnName("SystemAttributeOne"); this.Property(t => t.SystemAttributeTwo).HasColumnName("SystemAttributeTwo"); this.Property(t => t.ExpenditureName).HasColumnName("ExpenditureName"); this.Property(t => t.FactorType).HasColumnName("FactorType"); this.Property(t => t.FactorInt).HasColumnName("FactorInt"); this.Property(t => t.ProcessOrder).HasColumnName("ProcessOrder"); this.Property(t => t.ParentId).HasColumnName("ParentId"); this.Property(t => t.CreditId).HasColumnName("CreditId"); this.Property(t => t.WksSubjectToFee).HasColumnName("WksSubjectToFee"); } } }