partial void OnCategoryChanged(Category value);
Ejemplo n.º 2
0
        public void CreateCategory()
        {
            Stopwatch watch = Stopwatch.StartNew();

            var category = new Category();
            category.CategoryId = ID;
            category.Name = "";
            category.Description = "";

            try
            {
                using (var context = new PetshopDataContext())
                {
                    context.Category.InsertOnSubmit(category);
                    context.SubmitChanges();
                }
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }

            Assert.IsTrue(true);

            Console.WriteLine("Time: {0} ms", watch.ElapsedMilliseconds);
        }
 partial void OnCategoryChanging(Category newValue, Category oldValue);