RavenDb - Cannot Store Due to Duplicate Property Name
I'm trying to store a document in Raven - but a subclass hides a property on a base class - same name but different type. When I try and save it, I get this error:
"A member with the开发者_开发知识库 name 'User' already exists on 'Account'. Use the JsonPropertyAttribute to specify another name
However, the class is sealed and I don't own it or cannot extend it. Do I have any options at all?
If you can modify the class that you are trying to store, you can set the JsonContract (on the DocumentConventions) and modify how it gets serialized from there.
精彩评论