private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            // When you delete an object from the related entities collection
            // (in this case Products), the Entity Framework doesn’t mark
            // these child entities as deleted.
            // Instead, it removes the relationship between the parent and the child
            // by setting the parent reference to null.
            // So we manually have to delete the products
            // that have a Category reference set to null.

            // The following code uses LINQ to Objects
            // against the Local collection of Products.
            // The ToList call is required because otherwise the collection will be modified
            // by the Remove call while it is being enumerated.
            // In most other situations you can use LINQ to Objects directly
            // against the Local property without using ToList first.
            foreach (var item in _context.Products.Local.ToList())
            {
                if (item.ProductName == string.Empty)
                {
                    _context.Products.Remove(item);
                }
            }

            _context.SaveChanges();
            // Refresh the grids so the database generated values show up.
            this.ProductDataGrid.Items.Refresh();
        }