Beispiel #1
0
        public void SimpleUpdateByPropertyTest()
        {
            using (EasySession easySession = new EasySession())
            {
                ///[Test Update] - without relationship
                ProductCategory productCategory = new ProductCategory();

                int resultCount = productCategory.Count(easySession);
                Assert.AreEqual(4, resultCount);

                productCategory.ProductCategoryID = 4;
                productCategory.Name = "Test Category Update";
                //productCategory.Rowguid = Guid.NewGuid();
                productCategory.ModifiedDate = DateTime.Now;
                bool result = productCategory.Update(easySession, "Name", "Bikes");

                resultCount = productCategory.Count(easySession);
                Assert.AreEqual(4, resultCount);
            }
        }