Exemplo n.º 1
0
        public async Task TestUpdate()
        {
            var db = GetService();

            var category = new OleDbCategory
            {
                CategoryID   = 9,
                CategoryName = "My updated category",
                Description  = "My updated description"
            };

            var result = await db.UpdateAsync <OleDbCategory>(category, Check.Op("CategoryID", category.CategoryID));

            Assert.AreEqual(1, result);
        }
Exemplo n.º 2
0
        public async Task TestInsert()
        {
            var db = GetService();

            var category = new OleDbCategory
            {
                CategoryID   = 9,
                CategoryName = "My category",
                Description  = "My description"
            };

            var result = await db.InsertAsync <OleDbCategory>(category);

            Assert.AreEqual(1, result);
        }