From database I removed column company_location_id from table named Company. Then I removed property CompanyLocationId from model class. But I am getting above error.
public DbSet<Company> Company { get; set; }
Above property I set in DBContext class.
//[Column("company_location_id")]
//[ForeignKey(nameof(CompanyLocation))]
//public int? CompanyLocationId { get; set; }
[Column("created_by")]
[ForeignKey(nameof(AppUser))]
public int CreatedBy { get; set; }
[Column("creation_date")]
public DateTime CreationDate { get; set; }
I commented above property because it I removed that column from table.
But while getting from data from company table then I am getting above error. FYI I am using repository design pattern and entity framework.