Dependencies Injection on IDocumentSessionListener #1878
Replies: 2 comments 2 replies
-
@eliecer2323 You can add additional document session listeners to an If you're in v4, you can use a custom factory to build document sessions I can dig up for you if you want. We're still updating docs for v4 and we're behind. |
Beta Was this translation helpful? Give feedback.
-
Hi @jeremydmiller thanks for your support I appreciate it. do you suggest to use the |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, I'm trying to integrate an interceptor of CRUD operation to an specific table for doing another operations, so I found the IDocumentSessionListener interface for doing it
Here is my custom listener:
My service:
And here is the listener additions in the Startup.cs:
But my current trouble is that I don't find any way to do the dependencies injection for the ICSVService and its dependency IDocumentStore, is there a way to do the CDI in the
_.Listeners.Add(new LedgerListener());
code line? I can't simply pass the instances manually because there could be too many dependencies with their own dependenciesBeta Was this translation helpful? Give feedback.
All reactions