How can I fix a many to many relationship between two entities so that the third table is filled automatically in entity framework and web API (C#)
So I have a Customer entity and a Movie entity and I configured the many to many relationship correctly and EF created the third table CustomerMovie with two FK’s being CustomerId and MovieId both being the primary key. so now when I started creating the endpoints and it was all fine until I got to the AddMovie endpoint which adds a new movie to the database, it works but the table CustomerMovie is empty while it should have the CustomerId of the customer who added the movie and the MovieId of the movie that was added, so not sure if the endpoint implementation is wrong so far as to reach this goal or is the configuration wrong.