Beispiel #1
0
        public void ThrowExceptionOnSqLiteConnectionBatchQueryWithHints()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionStringSDS))
            {
                // Setup
                var tables = Database.CreateSdsCompleteTables(10, connection);

                // Act
                connection.BatchQuery <SdsCompleteTable>(0,
                                                         3,
                                                         OrderField.Ascending <SdsCompleteTable>(c => c.Id).AsEnumerable(),
                                                         (object)null,
                                                         hints: "WhatEver");
            }
        }
Beispiel #2
0
        public void ThrowExceptionOnSqLiteConnectionBatchQueryViaTableNameWithHints()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionString))
            {
                // Setup
                var tables = Database.CreateCompleteTables(10, connection);

                // Act
                connection.BatchQuery(ClassMappedNameCache.Get <CompleteTable>(),
                                      0,
                                      3,
                                      OrderField.Ascending <CompleteTable>(c => c.Id).AsEnumerable(),
                                      (object)null,
                                      hints: "WhatEver");
            }
        }
Beispiel #3
0
        public void TestSqLiteConnectionBatchQueryThirdBatchDescending()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionStringSDS))
            {
                // Setup
                var tables = Database.CreateSdsCompleteTables(10, connection);

                // Act
                var result = connection.BatchQuery <SdsCompleteTable>(2,
                                                                      3,
                                                                      OrderField.Descending <SdsCompleteTable>(c => c.Id).AsEnumerable(),
                                                                      (object)null);

                // Assert
                Helper.AssertPropertiesEquality(tables.ElementAt(3), result.ElementAt(0));
                Helper.AssertPropertiesEquality(tables.ElementAt(1), result.ElementAt(2));
            }
        }
Beispiel #4
0
        public void TestSqLiteConnectionBatchQueryViaTableNameThirdBatchAscending()
        {
            using (var connection = new SQLiteConnection(Database.ConnectionStringSDS))
            {
                // Setup
                var tables = Database.CreateSdsCompleteTables(10, connection);

                // Act
                var result = connection.BatchQuery(ClassMappedNameCache.Get <SdsCompleteTable>(),
                                                   2,
                                                   3,
                                                   OrderField.Ascending <SdsCompleteTable>(c => c.Id).AsEnumerable(),
                                                   (object)null);

                // Assert
                Helper.AssertMembersEquality(tables.ElementAt(6), result.ElementAt(0));
                Helper.AssertMembersEquality(tables.ElementAt(8), result.ElementAt(2));
            }
        }