georgekosmidis / LiteDbSample

Using LiteDb in an ASP.NET Core API
https://blog.georgekosmidis.net/2019/11/02/using-litedb-in-an-asp-net-core-api/
14 stars 6 forks source link

Advice #3

Open tinmac opened 10 months ago

tinmac commented 10 months ago

Im new to LiteDb & looking to use it in a Winui 3 project. Im wondering, as a single instance is desirable, & the fact that I have six Db services (each similar to the LiteDbWeatherForecastService in your great example) would I be better off creating a single static instance in App constrctor startup and using that in each service or is there another way to do this?

tinmac commented 10 months ago

Oh hang on, I see you set it as a singleton! I missed that.