Skip to main content

Examples Overview

This section contains practical examples and tutorials for working with MasLazu.AspNet components.

Getting Started Examplesโ€‹

๐Ÿš€ Basic Examplesโ€‹

๐Ÿ”ง Framework Examplesโ€‹

Module Examplesโ€‹

๐Ÿ” Authentication Examplesโ€‹

โœ… Verification Examplesโ€‹

Utility Examplesโ€‹

๐Ÿ“ง Email Sender Examplesโ€‹

Architecture Examplesโ€‹

๐Ÿ—๏ธ Design Patternsโ€‹

๐Ÿš€ Deployment Examplesโ€‹

Testing Examplesโ€‹

๐Ÿงช Testing Strategiesโ€‹

Performance Examplesโ€‹

โšก Optimizationโ€‹

Real-world Examplesโ€‹

๐ŸŒ Complete Applicationsโ€‹

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:

  1. Fork the repository
  2. Create your example in examples/your-example-name/
  3. Include complete documentation
  4. Add to this overview page
  5. 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โ€‹