
Set up ecommerce project with dapper by creating database, category and product tables, wiring a dapper context, and exposing a json api to fetch products with categories using stored procedure.
Define a utility service interface with save image, edit image, and delete image methods, using container name, file, and db path parameters.
Fetch the product by id, delete its image via the utility service, then execute the stored procedure to delete the product by id, and redirect to the index.
Design a view for the all products page in a .NET Core MVC app, using a data table with create and update actions and toaster and sweet alert notifications.
Build a register and login service in .NET Core MVC with Dapper, including an application user model, authenticate and register async methods, and an accounts controller for auth flows.
Implement a role based authorization filter by creating a role authorize attribute that implements IAuthorizationFilter and checks user roles, routing unauthenticated users to login and denying access when needed.
Implement cart management by adding plus, minus, and delete actions to update item quantities via the card service and refresh the session cart after changes.
Delete a cart item by id using a stored procedure, wire up the service, controller, and views to remove the item and refresh the session cart, then proceed to payment.
Build a cart summary by loading user info through the user profile service, aggregating cart items into an order header, and calculating the total for display.
Dapper Fundamentals Tutorials , How Dapper Communicate with database objects. How Dapper Handle Relationships like one to one and one to many and many to many. Complete Example of Ecommerce Project in .NET 8 with Dapper Technique. In project we have Some modules like UI, Product catalogue , cart and Order Details. How Dapper Handle Authentication and Authorization using efficient manner. Dapper communicate with database table create a session. Use Filters to Authorize. In this project we have a Repository pattern with Dependency Injection to handle Dapper Communication. We have a Dashboard for Admin and Customer. Admin Manage. Product Catalogue. Right now payment option is under processing but we will add later using stripe method and razor pay. Dapper Communicate with database table using stored procedure.
- Modules of the Ecommerce Project
Admin Module - CRUD Operation on Product and Category Catalogue , Manage Customer Order
Customer Module - Add Item into Cart and Proceed Order
Dapper Connection - Using one to many and many to many mapping
Dapper Security - Custom User Account with Hased password
Seed User Information using Dapper
Repository Pattern with Dependency Injection.
Dapper Methods which is Used in Project- ExecuteAsync, QueryAsync,QueryFirstOrDefault, Split Tables
Access data from database table via stored procedue.
Filters - Customer Request filter by their roles. In this project , i use custom Authorize Filter for customer request