private void btnAddCategory_Click(object sender, RoutedEventArgs e)
        {
            var factory = CreateSessionFactory();
            using (var session = factory.OpenSession())
            {
                var category = new Category
                                   {
                                       Name = txtCategoryName.Text.Trim(),
                                       Description = txtCategoryDescription.Text.Trim()
                                   };
                session.Save(category);
            }

            LoadCategories();
        }
        private void btnCreateSession_Click(object sender, RoutedEventArgs e)
        {
            var factory = CreateSessionFactory();

            using (var session = factory.OpenSession())
            {
                var category = new Category
                {
                    Name = "Beverages",
                    Description = "Some Description"
                };
                var product = new Product {
                    Name= "Milk",
                    Category = category
                };
                session.Save(category);
                session.Save(product);
            }
        }