public class Card
{
public int CardId { set; get; }
public Record Record { set; get; }
}
public class Record
{
public int RecordId { set; get; }
}
modelBuilder.Entity<Card>()
.HasRequired(x => x.Record)
.WithRequiredPrincipal()
.WillCascadeOnDelete(false);
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<ExecutiveUnitPriceList>()
.HasRequired(a => a.ExecutiveUnit)
.WillCascadeOnDelete(false);
}