Dears,
Could you help me to configure a separate database for AuditingStore and EntityHistory. I can't find any full soultion worked for that. As database growing fast from those tables I see it will be better to move them into seperate database with its own connevtionstring for sqlserver
Regards,
4 Answer(s)
-
0
Hi,
In order to implement your own AuditingStore, you first need to create a custom implementation, something like this;
public class MyAuditingStore : IAuditingStore, ITransientDependency { // custom implementation }
Then, you need to replace the existing one with your implementation like this in the PreInitialize method of your Core module;
Configuration.ReplaceService<IAuditingStore, MyAuditingStore>();
You can implement a same approach for
IEntityHistoryStore
. -
0
Hi,
Thanks for your answer. I figured out how to save auditt data on mongoDb and it is done. Now I can't get data bask to be read on the UI I changed AuditLogAppService to get data from mongoDB client but it fires exception: "System.Reflection.TargetException: Non-static method requires a target." when GetAuditLogs method call var resultCount = await query.CountAsync();
Please let me know what i did wrong in the below code.
-
0
Hi @amerWAM
I haven't queried data from MongoDB but I think your query is not executable in MongoDB. You can try to remove filter and sorting etc... and try to execute your query again.
-
0
Thank you very much, yeah its regarding mongo query.