using System.Linq; using System.Collections.Generic; using SQLite; namespace Vinno.vCloud.Disk.Database { public class SqlExecute { private static object locker = new object(); private static SQLiteConnection _sQLiteConnection; public static SQLiteConnection DB { get { if (_sQLiteConnection == null || _sQLiteConnection.Handle.IsClosed) { lock (locker) { var helper = SqliteConnection.GetHelper(); _sQLiteConnection = helper.DB; } } return _sQLiteConnection; } } } }