开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜