private PBSCore() { string dbPath = FileLocationProvider.DefaultDBPath; IsCollectionEmpty = !File.Exists(dbPath); DataBase = new DataBase() { DataProvider = new SqliteDataProvider() { Path = dbPath } }; DataBase.Load(); }
public List<Customer> GetCustomers(DataBase db) { return db.Select<Customer>(); }
public void Dispose() { DataBase.Dispose(); }
// 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(); }