I have a class:
public class classParty { private int _arrivedCount; public int PartyID {get; private set;} public DateTime PartyDate {get; private set;} public int ArrivedCount { get { return _arrivedCount; } set { _arrivedCount = value; } } }
I can match PartyId and PartyDate, but I do not have a column for ArrivedCount (this is a point in time, it is not saved).
How to tell EF 4.1 to stop searching for a column named "ArrivedCount"? This is not in the table. It will not be in the table. This is just a property of the object and thatβs it.
Thanks in advance.
EDIT: Here's the Fluent API configuration for classParty.
public class PartyConfiguration : EntityTypeConfiguration<classParty> { public PartyConfiguration() : base() { HasKey(p => p.PartyID); Property(p => p.PartyID) .HasColumnName("PartyID") .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity) .IsRequired(); Property(p => p.PartyDate) .HasColumnName("PartyDate") .IsRequired(); ToTable("Party"); } }
source share