I have two objects with a many to many relationship, let's call them Book and Category. The standard thing to do in Entity Framework - Code First would be to map them together and put a navigation property on either side, which I have done. I am working in a detached context, so I need to serialize my objects. So if I have two Book
objects and three Category
objects, one of which is shared by the two Book
objects, do I suffer a performance loss by serializing the Book
objects as they are by serializing the shared Category
twice? Would it be beneficial performance-wise to serialize my Book
objects and Category
objects separately and rebuild the relationship post-serialization?
I suppose it might depend on the serializer. If anyone has any other tips on the best method to go about this, I would appreciate any advice.