문제

I'm using RavenDb. I'm storing different objects, but these objects have the same name.

Namespace.Models.X

abstract class A

class B : A
class C : A


Namespace.Models.Y

abstract class D

class B : D
class C : D

Raven is storing both types in the format:

Namespace.Models.X.B as type/1 
Namespace.Models.Y.B as type/2

Is there a way to override the collection name associated with the document? I could change my class names but I'd rather not if possible.

도움이 되었습니까?

해결책

Yes, using:

documentStore.Conventions.FindTypeTagName = type => /* get type name as you wish it */;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top