Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# .net core entity framework one to many

public class Company
{
    public int Id { get; set; }
    public string Name { get; set; }
    public ICollection<Employee> Employees { get; set; }
}
public class Employee
{
    public int Id { get; set; }
    public string Name { get; set; }
    public Company Company { get; set; }
}
Source by www.learnentityframeworkcore.com #
 
PREVIOUS NEXT
Tagged: #core #entity #framework
ADD COMMENT
Topic
Name
9+5 =