c# - Add-Migration won't detect changes to foreign key -
 The EF migration model can not seem to detect my changes because it only generates an empty    __Migration History Table :     Mapping      Mapping       is based on whether the  () / Microsoft             File:  
  
   Earlier  
 
 
 this.HasOptional (t = & gt; t.Using) .Very (T = & gt; T.UsedBy) .HasForeignKey (t = & gt; t.UsingId); Public square house {// deleted} after the public square car     
 
 added public virtual Ilkonak & lt; Person & gt; Used {received; Set; }} Public class person {public int? Experiment id {receives; Set; } // Using a converted public virtual car {get; Set; }}    
 this.HasOptional (t = & gt; t.Using) .Very (T = & gt; t.UsedBy). HesForeignKey (t = & gt; t.UsingId); As already mentioned in my comment, I can reproduce it, but change the name of      
 public override zero () {DropForeignKey ("Dbo.People", "ID of experiment", "DBO.Home"); AddForeignKey ("dbo.People", "UsingId", "dbo.Cars", "ID"); } Public override-free (down) (drop-over ("debo. Peepal", "UIID", "DBO. Cars"); AddForeignKey ("dbo.People", "UsingId", "dbo.Houses", "ID"); }    add-migration  creates, when the name of the property changes.   
 
  
Comments
Post a Comment