how to set net core api entity framwork with classes that hade a relationship? code example
Example: one to many relationship ef core
// 1:M
// ONE company has MANY employees
public class Company
{
public int Id { get; set; }
public string Name { get; set; }
public ICollection Employees { get; set; }
}
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
public Company Company { get; set; }
}