I have three tables: Items, Category and the junction table CategoryItems. Items and Category have a many to many relationship.
CategoryItems have three columns: Category_Id, Item_Id and Position.
How do i use Position to sort my items with Entity Framework?
I am using this model builder:
modelBuilder
.Entity<Category>()
.HasMany(c => c.Items)
.WithMany();
I ended up using this for the loading of a categories items:
And then using an SQL-query to change the position.