-1

I have a question about LiteDB. I make an asp.net mvc application to interact with LiteDB. But all data change only save in log.db file. How can I update to main db file?

Thanks!

1 Answers1

0

Please try following Statement:

multiple operations against LiteDB

db.Commit();
Amin Golmahalleh
  • 3,585
  • 2
  • 23
  • 36
Uday
  • 464
  • 3
  • 11
  • Thank you! But It's not affected. I don't use transaction when insert. – Ha Van Son Apr 20 '20 at 07:55
  • can you share script, i can help ur problem – Uday Apr 20 '20 at 08:01
  • Thanks you Mr @Uday. I have solve my problem. I receive a answer for this. While auto-checkpoint is supposed to run eventually (by default, every time the log file reaches 8MB), it might not happen if your application is always using the datafile. Try running a db.Checkpoint() every once in a while. – Ha Van Son Apr 21 '20 at 00:47