use the compositekey like this
[Table("PageTranslations")]
public class PageTranslation : Entity<int>, IEntityTranslation<Page> { <span style="color:#FF0000"> [Key,Column(Order= 1)] //important or use FluentApi : HasKey(t=> new {t.Id,t.CoreId})</span> <span style="color:#FF0000">public int Id {get;set;} // id shuold be here</span> public Page Core { get; set; } <span style="color:#FF0000"> [Key,Column(Order= 1)]</span> public int CoreId { get; set; } public string Language { get; set; }
public string Name { get; set; }
public string Content{ get; set; }
}
The EntityFramework will delete Entry when the key is destory , so use the compositeKey is best way i think :D