I have two tables. Client and Conversations. In the view for creating/editing clients, there is also an option for adding Conversations associated to the client (using BeginCollectionItem). When I try to update (in the edit view) using the following code:
db.Clients.Attach(client);
db.Entry(client).State = EntityState.Modified; //Conversations not added
The fields in the Client table are updated but the conversations are not added. I do not face this issue while creating a client.
db.Clients.Add(client); //Conversations are added
Is it possible to accomplish this without having to add the conversations explicitly?