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
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