Inheritance: IDataAccessLayer
Beispiel #1
0
 private PBSCore()
 {
     string dbPath = FileLocationProvider.DefaultDBPath;
     IsCollectionEmpty = !File.Exists(dbPath);
     DataBase = new DataBase()
     {
         DataProvider = new SqliteDataProvider() { Path = dbPath }
     };
     DataBase.Load();
 }
Beispiel #2
0
 public List<Customer> GetCustomers(DataBase db)
 {
     return db.Select<Customer>();
 }
Beispiel #3
0
 public void Dispose()
 {
     DataBase.Dispose();
 }
Beispiel #4
0
//        public IRepository<T> GetRepository<T>() where T : class
//        {
//
//                if (_roomsRepository == null)
//                    _roomsRepository = new RoomRepository(DataBase);
//                return _roomsRepository;
//                return new RepositoryFactory<T>(_ctx).GetRepositoryInstance();
//
//        }

        public void Save()
        {
            DataBase.SaveChanges();
        }