public void UpsertTest()
        {
            Categories c = null;
            Task.Run(async() =>
            {
                c = new Categories()
                {
                    CategoryID = 999,
                    CategoryName = "CategoryName",
                };
                using (var client = DataFactory.CretDbClient())
                {
                    await client.Cmd.UpsertAsync(c, new []{ "CategoryName" }, null);
                }
            }).Wait();

            Assert.AreNotEqual(c.CategoryID, 0);
        }
        public void InsertTest()
        {
            Categories c = new Categories()
            {
                CategoryName = Guid.NewGuid().ToString().Substring(0, 10),
                Description = Guid.NewGuid().ToString()
            };
            using (var client = DataFactory.CretDbClient())
            {
                client.Cmd.Insert(c);
            }

            Assert.AreNotEqual(c.CategoryID, 0);
        }
        public void UpdateTest()
        {
            Categories c = new Categories()
            {
                CategoryID = 9,
                CategoryName = "CategoryName",
            };
            using (var client = DataFactory.CretDbClient())
            {
                client.Cmd.Update(c, p => p.CategoryName);
            }

            Assert.AreNotEqual(c.CategoryID, 0);
        }