By naming the property name as Class name + Id, Entity Core creates primary key for particular table.
publicclassAuthor
{
publicint AuthorId { get; set; }
publicstring Name { get; set; }
}
As shown above, we can see the AuthorId property which contains the class name Author plus Id. Because of this Entity Framework Core creates AuthorId as the primary key for the Author table in the database.