いつ
var codeFirstRepositor = new Donors();
var list = codeFirstRepositor.CampaignReps.Select(c => c).ToList();
- クラスコンストラクター内にブレークポイントを設定すると、
CampaignRep
それはまったく呼び出されません-オブジェクトのインスタンス化の前に例外が発生するようです
コンテクスト
public class Donors : DbContext
{
public Donors()
{
// Needed for WCF serialization to work
Configuration.ProxyCreationEnabled = false;
}
public DbSet<CampaignRep> CampaignReps { get; set; }
}
EntitySqlException
'CampaignsReps' is not a member of Transient.collection[MyNameSpace.Donor(Nullable=True,DefaultValue=)]'. To extract a property of a collection element, use a subquery to iterate over the collection. Near escaped identifier, line 1, column 10.
このエラーの原因は何ですか?