0
antonis created
Hi
I am trying to create two new tables that have a one to many relationship. I am looking at the source code and I can not find how it is done.
e.g cant see where the relationship between AbpEditions table and AppSubscriptionPayments table is set.
2 Answer(s)
-
0
Hi @antonis
The relation is added automatically. You can follow the same approach.
-
0
It is set by convention.
public class SubscriptionPayment : FullAuditedEntity<long> { public int EditionId { get; set; } public Edition Edition { get; set; } // ... }
Reference: https://docs.microsoft.com/en-us/ef/core/modeling/relationships#conventions