LinqConnect Documentation
In This Topic
    Defining Associations
    In This Topic

    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.