How danggkhoamkt/doan_webshopping works
WebShopping is an ASP.NET MVC storefront with an admin area for managing catalog data and orders. Customers browse products, maintain a session-backed cart, and submit an order; admins sign in before using protected management controllers. The sampled code shows checkout persisting orders and order lines through Entity Framework, while startup configures SQL Server, sessions, authentication, and seeding. Several controllers and the order-status helper are indexed but not excerpted, so their detailed behavior and unshown links are not inferred.
Main entry points: AppDbContext.cs EF database context · CartController.cs Cart and checkout · DbSeeder.cs Database seeding · Product.cs Product
Components 22
Storefront
- Home browsing
WebShopping/Controllers/HomeController.cs - Product browsing
WebShopping/Controllers/ProductController.cs - Cart and checkout
WebShopping/Controllers/CartController.cs - Cart session
WebShopping/Helpers/CartSession.cs - Cart summary
WebShopping/ViewComponents/CartSummaryViewComponent.cs
Administration
- Admin dashboard
WebShopping/Areas/Admin/Controllers/AdminController.cs - Category management
WebShopping/Areas/Admin/Controllers/CategoryController.cs - Product management
WebShopping/Areas/Admin/Controllers/ProductController.cs - Order management
WebShopping/Areas/Admin/Controllers/OrderController.cs
Domain and persistence
- EF database context
WebShopping/Data/AppDbContext.cs - Database seeding
WebShopping/Data/DbSeeder.cs - Category
WebShopping/Models/Category.cs - Product
WebShopping/Models/Product.cs - Order
WebShopping/Models/Order.cs - Order line
WebShopping/Models/OrderDetail.cs - User
WebShopping/Models/User.cs - Cart item
WebShopping/Models/CartItem.cs - Order status helper
WebShopping/Helpers/OrderStatusHelper.cs
Identity and startup
- Account login
WebShopping/Controllers/AccountController.cs - Application startup
WebShopping/Program.cs
Other components
- Shopper
- Admin user
Connections 33
- Shopper → Home browsing: browses
- Shopper → Product browsing: views products
- Shopper → Cart and checkout: manages cart
- Home browsing → EF database context: queries
WebShopping/Controllers/HomeController.cs - Product browsing → EF database context: queries
WebShopping/Controllers/ProductController.cs - Cart and checkout → EF database context: loads and saves
WebShopping/Controllers/CartController.cs - Cart and checkout → Cart session: reads and updates
WebShopping/Controllers/CartController.cs - Cart and checkout → Order: creates
WebShopping/Controllers/CartController.cs - Cart and checkout → Order line: creates lines
WebShopping/Controllers/CartController.cs - Cart and checkout → Cart item: uses
WebShopping/Controllers/CartController.cs - Cart summary → Cart session: reads
WebShopping/ViewComponents/CartSummaryViewComponent.cs - Admin user → Account login: signs in
- Admin user → Admin dashboard: manages store
- Account login → EF database context: checks credentials
WebShopping/Controllers/AccountController.cs - Admin dashboard → EF database context: queries
WebShopping/Areas/Admin/Controllers/AdminController.cs - Category management → EF database context: manages categories
WebShopping/Areas/Admin/Controllers/CategoryController.cs - Product management → EF database context: manages products
WebShopping/Areas/Admin/Controllers/ProductController.cs - Product management → Product: uploads images for
WebShopping/Areas/Admin/Controllers/ProductController.cs - Order management → EF database context: queries orders
WebShopping/Areas/Admin/Controllers/OrderController.cs - Application startup → EF database context: configures and migrates
WebShopping/Program.cs - Application startup → Database seeding: runs
WebShopping/Program.cs - EF database context → Category: maps
WebShopping/Data/AppDbContext.cs - EF database context → Product: maps
WebShopping/Data/AppDbContext.cs - EF database context → Order: maps
WebShopping/Data/AppDbContext.cs - EF database context → Order line: maps
WebShopping/Data/AppDbContext.cs - EF database context → User: maps
WebShopping/Data/AppDbContext.cs - Database seeding → EF database context: seeds
WebShopping/Data/DbSeeder.cs - Database seeding → User: creates
WebShopping/Data/DbSeeder.cs - Database seeding → Category: creates
WebShopping/Data/DbSeeder.cs - Database seeding → Product: creates
WebShopping/Data/DbSeeder.cs - Category → Product: has products
WebShopping/Models/Category.cs - Order → Order line: contains
WebShopping/Models/Order.cs - Order line → Product: references
WebShopping/Models/OrderDetail.cs