public List <T> GetItemsWithChildren(Expression <Func <T, bool> > predicate = null)
 {
     using (SQLiteConnection _dbManager = new SQLiteConnection(_baseUrl.GetDatabasePath(), storeDateTimeAsTicks: false))
     {
         return(_dbManager.GetAllWithChildren(predicate, true));
     }
 }
Exemple #2
0
 public TableQuery <T> AsQueryable()
 {
     using (SQLiteConnection _dbManager = new SQLiteConnection(_baseUrl.GetDatabasePath(), ReadOnlyFlags, storeDateTimeAsTicks: false))
     {
         return(_dbManager.Table <T>());
     }
 }
Exemple #3
0
 public Repository(IBaseUrl baseUrl)
 {
     _baseUrl = baseUrl;
     //if (_dbManager == null)
     //{
     _dbManager = new SQLiteConnection(_baseUrl.GetDatabasePath());
     _dbManager.CreateTable <T>();
     //}
 }
Exemple #4
0
        public Repository(IBaseUrl baseUrl)
        {
            _baseUrl = baseUrl;


            using (SQLiteConnection _dbManager = new SQLiteConnection(_baseUrl.GetDatabasePath(), WriteOnlyFlags, storeDateTimeAsTicks: false))
            {
                _dbManager.CreateTable <T>();
            }
        }
 public QueuedRepository(IBaseUrl baseUrl)
 {
     _baseUrl   = baseUrl;
     _dbManager = new SQLiteAsyncConnection(_baseUrl.GetDatabasePath(), storeDateTimeAsTicks: false);
     _dbManager?.CreateTableAsync <T>();
 }