Examples Overview
This section contains practical examples and tutorials for working with MasLazu.AspNet components.
Getting Started Examplesโ
๐ Basic Examplesโ
- Your First API - Create a complete CRUD API from scratch
- Simple CRUD Operations - Basic create, read, update, delete operations
- Entity Relationships - Working with related entities
๐ง Framework Examplesโ
- Advanced Filtering - Complex queries and filtering
- Custom Validation - Implementing custom validation rules
- Repository Patterns - Advanced repository usage
- Pagination Strategies - Different pagination approaches
Module Examplesโ
๐ Authentication Examplesโ
- Authentication + Verification Setup - Complete user system
- Custom User Properties - Extending user entities
- Multi-tenant Authentication - Multi-tenant scenarios
- JWT Configuration - Advanced JWT setup
โ Verification Examplesโ
- Email Verification Workflow - Complete email verification
- SMS Verification - SMS-based verification
- Custom Verification Templates - Custom email templates
Utility Examplesโ
๐ง Email Sender Examplesโ
- Gmail Setup Guide - Gmail API configuration
- SendGrid Setup Guide - SendGrid configuration
- Custom Email Templates - Creating custom templates
- Email Testing Strategies - Testing email functionality
- Provider Switching - Switching between providers
Architecture Examplesโ
๐๏ธ Design Patternsโ
- Event-driven Modules - Module communication with events
- CQRS Implementation - Command Query Responsibility Segregation
- Clean Architecture - Implementing clean architecture
- Microservices Setup - Breaking into microservices
๐ Deployment Examplesโ
- Docker Deployment - Containerizing your application
- Azure Deployment - Deploying to Azure
- AWS Deployment - Deploying to AWS
- CI/CD Pipeline - Automated deployment pipeline
Testing Examplesโ
๐งช Testing Strategiesโ
- Unit Testing - Testing services and components
- Integration Testing - End-to-end testing
- API Testing - Testing API endpoints
- Database Testing - Testing with databases
Performance Examplesโ
โก Optimizationโ
- Performance Optimization - Improving application performance
- Database Optimization - Database performance tuning
- Caching Strategies - Implementing caching
- Load Testing - Performance testing
Real-world Examplesโ
๐ Complete Applicationsโ
- E-commerce API - Complete e-commerce backend
- Blog Platform - Content management system
- Task Management - Project management API
- Social Media API - Social platform backend
Code Samples Repositoryโ
All examples are available in our GitHub repository with complete, runnable code:
๐ MasLazu.AspNet Examples Repository
Each example includes:
- Complete source code
- README with setup instructions
- Sample data and test scripts
- Docker compose files for dependencies
- Postman collections for API testing
Running Examplesโ
Prerequisitesโ
Most examples require:
- .NET 9 SDK
- Docker (for databases)
- Git
Quick Startโ
# Clone the repository
git clone https://github.com/MasLazu/MasLazu.AspNet.git
cd MasLazu.AspNet/examples
# Choose an example
cd first-api
# Start dependencies (PostgreSQL, Redis, etc.)
docker-compose up -d
# Run the application
dotnet run
# Test the API
curl http://localhost:5000/api/v1/health
Contributing Examplesโ
We welcome contributions! To add a new example:
- Fork the repository
- Create your example in
examples/your-example-name/
- Include complete documentation
- Add to this overview page
- Submit a pull request
Example Structureโ
examples/your-example-name/
โโโ src/ # Source code
โโโ tests/ # Unit and integration tests
โโโ docker-compose.yml # Dependencies
โโโ README.md # Setup and usage instructions
โโโ postman/ # API test collections
โโโ docs/ # Additional documentation
Getting Helpโ
- ๐ Documentation - Complete documentation
- ๐ฌ GitHub Discussions - Ask questions
- ๐ Issues - Report bugs
- ๐ง Contact - Direct support