c# ef-fluent-api entity-framework entity-framework-core sql

SqlClient.SqlException: Invalid column name ClassNameId While fetching data from Fluent API

I am new to this EF,I am tring to fetch data from Sql Db table, and it gives me error like invalid classNameId error.

public class ClassName
[Display(Name = "Id:")]
public int Id { get; set; }
[Display(Name = "Created By:")]
[Required(ErrorMessage = "Please enter created by.")]
[StringLength(5, MinimumLength = 2)]
public string CreatedBy { get; set; }
public List<OtherClass> OtherClassList{ get; set; }
public class OtherClass
[Display(Name = "Control:")]
public String Control { get; set; }
[Display(Name = "PID:")]
public int PID{ get; set; }


protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasKey(p => p.Id);
.HasKey(p=> new { p.Control, p.PID});

I have use Fluent API for get data from MSSql.