title: There are no primary in referenced table 'x' that match referencing column foreign key ".y"
body: <p>There are no primary or candidate keys in the referenced table 'dbo.Client_Master' that match the referencing column list in the foreign key 'FK_dbo.Client_Question_Master_dbo.Client_Master_client_id'.
  Could not create constraint or index. See previous errors.</p>
  
  <p>My Client_Master Model</p>
  
  <pre><code> public class Client_Master
  {
  
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public long Client_Id { get; set; }
      public string Client_Name { get; set; }        
      public string Client_Address { get; set; }
      public string Client_Email { get; set; }
      public string Client_Phone { get; set; }
      [DefaultValue(" ")]
      public string Client_Country { get; set; }
      [DefaultValue(" ")]
      public string Client_State { get; set; }
  
      [DefaultValue(" ")]
      public string Client_Postcode { get; set; }        
      public bool Is_Active { get; set; }
      public long? Created_By { get; set; }
      public DateTime? Created_Date { get; set; }
  
      [ForeignKey("Business_Master")]
      public long? Business_Id { get; set; }
  
      [ForeignKey("Categories")]
      public long? Category_Id { get; set; }
  
      public virtual Categories Categories { get; set; }
  
      public virtual Business_Master Business_Master { get; set; }
  
      [JsonIgnore]
      public virtual ICollection&lt;Client_Question_Master&gt; Client_Question_Master { get; set; }
  
  
  
  }
  </code></pre>
  
  <p>And My Client_Question_Master Modal</p>
  
  <pre><code> public class Client_Question_Master
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public long client_question_master_id { get; set; }
  
      [ForeignKey("Client_Master")]
      public long? client_id { get; set; }
  
      public virtual Client_Master Client_Master { get; set; }
  
      [ForeignKey("Question_Types")]
      public long? question_type_id { get; set; }
  
      public virtual Question_Types Question_Types { get; set; }
  
      public string question { get; set; }
  
      public long order_no { get; set; }
  
      public bool isContribute { get; set; } = true;
  
      [ForeignKey("Section_Master")]
      public long? section_id { get; set; }
  
      public virtual Section_Master Section_Master { get; set; }
  
      public double amount { get; set; }
  
      public bool isActive { get; set; } = true;
  
      public bool isRequired { get; set; } = true;
  
      public bool isComment { get; set; } = true;
  
      public string values { get; set; } 
  
      public bool isRevenue { get; set; }
  
      public bool isStaff { get; set; }
  
      public bool isMarketing { get; set; }
  
      public DateTime created_date { get; set; } = DateTime.Now;
  
  
  }
  </code></pre>
  
  <p>After add-migration during updating database it is giving me error.</p>