Closed nishojib closed 4 years ago
Hi @supremeboy18,
Firstly, the test TestChangeAuthorsNewListOk in Ch03_ManyToManyUpdate ADDS a new BookAuthor
many-to-many linking class to a Book
entity class, which adds another Author
to the many-to-many relationships. If that is what you need then you could use CreateAndSave<T>
method with a BookAuthor
entity class or a DTO that mapped to the BookAuthor
entity class.
If you really want to update an existing BookAuthor
many-to-many linking class, then you can't use GenericServices and have to do it by hand. That's because GenericServices can't change a primary key.
I hope that helps.
How would you go about replacing a row in many to many relationship using generic services? The current behavior allows me to add a new row whenever I am trying to change it using a DTO.
I want a behavior similar to the test TestChangeAuthorsNewListOk in Ch03_ManyToManyUpdate of your book using generic services.
Thank you.