- Introduction
- Features
- Architecture
- Technologies Used
- Getting Started
- Usage
- Logging Service
- Export Service
- Contributing
- Contact
PracticeForRevision is a web application built with ASP.NET Core that allows users to manage products and process payments. This project showcases various skills, including CRUD operations, PayPal payment integration, data export to Excel, and logging actions and errors for tracking purposes.
- Product Management: Create, read, update, and delete products.
- Pagination: View products with pagination for better usability.
- PayPal Integration: Process payments securely via PayPal.
- Excel Export: Export product and payment data to an Excel file with a timestamp.
- Logging: Automatically log all actions and errors to a file and database.
The application follows a layered architecture:
- Controllers: Handle HTTP requests and responses.
- Services: Contain business logic and interact with repositories.
- Repositories: Manage data access to the database.
- Models: Define data structures.
- Views: Render the user interface.
- ASP.NET Core: Framework for building web applications.
- Entity Framework Core: ORM for data access.
- PayPal API: Integration for payment processing.
- EPPlus: Library for Excel export.
- Bootstrap: Front-end framework for responsive design.
- SQL Server: Database management system.
-
Clone the repository:
git clone https://github.com/yourusername/PracticeForRevision.git cd PracticeForRevision
-
Configure the database connection in
appsettings.json
:"ConnectionStrings": { "DefaultConnection": "Server=your_server;Database=your_database;User Id=your_user;Password=your_password;" }
-
Update the PayPal settings in
appsettings.json
:"PayPal": { "ClientId": "your_paypal_client_id", "ClientSecret": "your_paypal_client_secret" }
-
Run the following commands to set up the database:
dotnet ef database update
-
Build and run the application:
dotnet run
- View Products: Navigate to the
/Products
page to view all products with pagination. - Create Product: Click the "Create New" button to add a new product.
- Edit Product: Click the "Edit" button on a product to update its details.
- Delete Product: Click the "Delete" button to remove a product.
- Process Payment: Click the "Buy" button on a product to initiate the PayPal payment process.
- Export to Excel: Click the "Export" button to download product and payment data as an Excel file.
The logging service captures all actions and errors with timestamps. The logs are saved to both a file and the database for comprehensive tracking.
The export service generates an Excel file containing data from the products and payment details tables. Each export is saved with a timestamp in the filename.
Contributions are welcome! Please fork the repository and create a pull request with your changes.
For any questions or feedback, please contact:
--