public PostgreSQL() { Db = new PostgreSQLConnection(); // Create table "test" for unit tests CreateTestTable(); }
public ListCRUDOperations() { Db = new PostgreSQLConnection(); var userToken = UserFactory.CreateNewUser(Db, "testuser", "testuserlist", "password"); if (userToken != null) { UserId = UserFactory.LoadSingleByToken(userToken).Id; UserToken = userToken; } }
public ItemCRUDOperations() { Db = new PostgreSQLConnection(); var userToken = UserFactory.CreateNewUser(Db, "testuser", "testuseritem", "password"); if (userToken != null) { UserId = UserFactory.LoadSingleByToken(userToken).Id; UserToken = userToken; } var bookId = BookFactory.CreateNewBook(Db, "test book", "test author"); var listId = ListFactory.CreateNewList(Db, UserToken, "test list"); BookId = (int)bookId; ListId = (int)listId; }
public UsersController() { Db = new PostgreSQLConnection(); }
public BookListController() { Db = new PostgreSQLConnection(); }
public IDisposable BeginTransaction(IsolationLevel isolation) { PostgreSQLTransaction = PostgreSQLConnection.BeginTransaction(isolation); return(PostgreSQLTransaction); }
public void Close() { PostgreSQLConnection?.Close(); }
public void Open() { PostgreSQLConnection?.Open(); }
public ListsController() { Db = new PostgreSQLConnection(); }
public BookCRUDOperations() { Db = new PostgreSQLConnection(); }
public UserCRUDOperations() { Db = new PostgreSQLConnection(); }