Add category ladders
This commit is contained in:
parent
90eccbf2f6
commit
ea6adeb58f
23 changed files with 983 additions and 122 deletions
|
|
@ -72,9 +72,10 @@ namespace DataLayer.Configurations
|
|||
.SetPropertyAccessMode(PropertyAccessMode.Field);
|
||||
|
||||
entity
|
||||
.HasOne(b => b.Category)
|
||||
.WithMany()
|
||||
.HasForeignKey(b => b.CategoryId);
|
||||
.Metadata
|
||||
.FindNavigation(nameof(Book.CategoriesLink))
|
||||
// PropertyAccessMode.Field : Categories is a get-only property, not a field, so use its backing field
|
||||
.SetPropertyAccessMode(PropertyAccessMode.Field);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue