Esempio n. 1
0
        public PostgreSQL()
        {
            Db = new PostgreSQLConnection();

            // Create table "test" for unit tests
            CreateTestTable();
        }
Esempio n. 2
0
        public ListCRUDOperations()
        {
            Db = new PostgreSQLConnection();

            var userToken = UserFactory.CreateNewUser(Db, "testuser", "testuserlist", "password");

            if (userToken != null)
            {
                UserId    = UserFactory.LoadSingleByToken(userToken).Id;
                UserToken = userToken;
            }
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
 public UsersController()
 {
     Db = new PostgreSQLConnection();
 }
Esempio n. 5
0
 public BookListController()
 {
     Db = new PostgreSQLConnection();
 }
Esempio n. 6
0
 public IDisposable BeginTransaction(IsolationLevel isolation)
 {
     PostgreSQLTransaction = PostgreSQLConnection.BeginTransaction(isolation);
     return(PostgreSQLTransaction);
 }
Esempio n. 7
0
 public void Close()
 {
     PostgreSQLConnection?.Close();
 }
Esempio n. 8
0
 public void Open()
 {
     PostgreSQLConnection?.Open();
 }
Esempio n. 9
0
 public ListsController()
 {
     Db = new PostgreSQLConnection();
 }
Esempio n. 10
0
 public BookCRUDOperations()
 {
     Db = new PostgreSQLConnection();
 }
Esempio n. 11
0
 public UserCRUDOperations()
 {
     Db = new PostgreSQLConnection();
 }