c# - Understanding ForeignKey attribute in entity framework code first -


Look for the following post for some background:

I always thought That foreign code was used to organize foreign property in a category, which determines navigation property eg. Public class MemberDataSet {[Key] [Database Generated Entitlement (Database Generated Opportunity. IDTT)] Public Int ID (Received);

 

Fluent API:

  modelbuilder.Entity & lt; MemberDataSet & gt; () .Usage (MDS => mds.DeferredData). With mandatory () WillCascadeOnDelete ();  

Comments