Entity Framework Core nullable foreign key
问题 I am having trouble getting a list of entities where a foreign key value could be null. The Models: public class Company { [Key] [Required] public int Id { get; set; } [Display(Name = "Company Name")] public string CompanyName { get; set; } [Display(Name = "Main Phone")] public string LandPhone { get; set; } [Display(Name = "Fax")] public string FaxPhone { get; set; } } public class Contact { [Key] [Required] public int Id { get; set; } [Display(Name ="First Name")] public string FirstName {