Luciferno
How to keep track of third property in Many-To-Many
I have 2 models one that is Reservation and one that is Menu, They have a many-to-many relation but I wanna keep track on the reservation how many times one menu is ordered for that resrevation.
This is my current many-to-many table :
This is my current OnModelCreating for that table
I am kinda stuck on how to approach this.
4 replies
EF-Core data reference [Answered]
So for school we have to make a Restaurant management system.
Now I am working on Reservations with the following model
But the problem I encounter is that the list ChoosenMenus exists of Menus that are already saved in my database but when I make a post request it still tries to add the menu's
This is my DbContext regarding the Reservation model so far
So I somehow need to make a reference to the already exisiting menus instead of adding them but I dont really know how to
64 replies