An Entity is a class that represents a table in the database. Each instance of an entity corresponds to a row in the table.
public class Product
{
public int Id { get; set; } // Primary key
public string Name { get; set; }
public decimal Price { get; set; }
public int CategoryId { get; set; }
// Navigation property
public Category Category { get; set; }
}
Requirements for an entity: