1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using SQLite;
- using System;
- using System.Collections.Generic;
- using Vinno.IUS.Common.Log;
- using Vinno.vCloud.Disk.Database.Dto;
- namespace Vinno.vCloud.Disk.Database
- {
-
-
-
- public class DbHelper : IDisposable
- {
- public int MaxRecordCount = 800;
-
-
-
- public SQLiteConnection DB { get; set; }
-
-
-
-
- public void OnInitialize(string dbPath)
- {
- DB = new SQLiteConnection(dbPath);
- DB.CreateTable<FoldersAndFiles>();
- DB.CreateTable<User>();
- }
-
-
-
- public void Dispose()
- {
- if (DB != null)
- {
- DB.Close();
- DB.Dispose();
- }
- }
- }
- }
|