protected void RemoveButton_Click(object sender, EventArgs e) { using (ShoppingCartActions actions = new ShoppingCartActions()) { actions.RemoveAll(); Server.Transfer("Cart.aspx"); } }
void Application_Start(object sender, EventArgs e) { // Code that runs on application startup RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //Remove previous db stuff ShoppingCartActions actions = new ShoppingCartActions(); actions.RemoveAll(); }