public void Can_Save_TaskQueue_table()
        {
            using var db = OpenDbConnection();
            db.CreateTable <TaskQueue>(true);

            var row = TaskQueue.Create(1);

            db.Save(row);

            var rows = db.Select <TaskQueue>();

            Assert.That(rows, Has.Count.EqualTo(1));

            //Update the auto-increment id
            row.Id = rows[0].Id;

            TaskQueue.AssertIsEqual(rows[0], row);
        }
Exemplo n.º 2
0
        public void Can_insert_TaskQueue_table()
        {
            using (var db = new OrmLiteConnectionFactory(ConnectionString, FirebirdDialect.Provider).Open())
            {
                db.CreateTable <TaskQueue>(true);

                var row = TaskQueue.Create(1);

                db.Insert(row);

                var rows = db.Select <TaskQueue>();

                Assert.That(rows, Has.Count.EqualTo(1));

                //Update the auto-increment id
                row.Id = rows[0].Id;

                TaskQueue.AssertIsEqual(rows[0], row);
            }
        }
Exemplo n.º 3
0
        public void Can_insert_TaskQueue_table()
        {
            using (var db = ConnectionString.OpenDbConnection())
                using (var dbConn = db.CreateCommand())
                {
                    dbConn.CreateTable <TaskQueue>(true);

                    var row = TaskQueue.Create(1);

                    dbConn.Insert(row);

                    var rows = dbConn.Select <TaskQueue>();

                    Assert.That(rows, Has.Count.EqualTo(1));

                    //Update the auto-increment id
                    row.Id = rows[0].Id;

                    TaskQueue.AssertIsEqual(rows[0], row);
                }
        }