title: How to open a connection with exclusive access to the databalse in Entity Framework Core 5
body: <p>My app runs locally and stores its data in a sqlite database file. I need to ensure that when one instance of the application is running, the other instance <strong>can't</strong> write to the same database file.</p>
  <p>If I worked with the database file not through the sqlite engine, I could open it for reading and writing and not close it, but how this can be done in the sqlite engine?</p>
  <p>And how this can be done in sqlite provider in Entity Framework?</p>