LinqConnect Documentation
Defining Associations

Association is created using the Association method , that returns an instance of the AssociationStartConfiguration class.

The example below demonstrates defining an association:

builder.Entity<Order>()
    .Association()
        .Name(@"Company_Order")
        .ToOne(order => order.Company).ThisKey(order => order.ShipCompanyID)
        .FromMany(company => company.Orders).OtherKey(company => company.CompanyID)

For more detains on defining the association mapping see the Association Configuration Classes topic.