A modern Point of Sale (POS) system backend built with .NET 9, demonstrating professional-grade software development skills including C#, Entity Framework Core, SQL Server, XML configuration, and RESTful API design.
- Product Management: CRUD operations for products with categories and inventory tracking
- Order Processing: Complete order lifecycle management with payment processing
- Database Integration: Entity Framework Core with SQL Server LocalDB
- XML Configuration: Advanced XML-based configuration management with validation
- RESTful API: Well-designed REST endpoints with proper HTTP status codes
- Data Validation: Comprehensive input validation and error handling
- Business Logic: Transaction management, stock control, and pricing calculations
- Documentation: Swagger/OpenAPI integration for API documentation
- Logging: Structured logging throughout the application
- Health Checks: Database connectivity monitoring
- .NET 9.0 - Modern C# framework
- ASP.NET Core Web API - RESTful API framework
- Entity Framework Core - Object-relational mapping
- SQL Server LocalDB - Development database
- Swagger/OpenAPI - API documentation
- XML Processing - Configuration management
- Dependency Injection - Service registration and lifecycle management
- .NET 9.0 SDK or later
- Visual Studio 2022 or VS Code
- SQL Server LocalDB (included with Visual Studio)
# Navigate to project directory
cd POSSystem
# Restore dependencies
dotnet restore
# Build the project
dotnet build
The application uses SQL Server LocalDB and will automatically create the database on first run with sample data.
dotnet run
The API will be available at:
- Swagger UI:
https://localhost:7065
(default) - Health Check:
https://localhost:7065/health
- Complex relationships with proper foreign keys
- Fluent API configuration for database schema
- Repository pattern with service layer abstraction
- Transaction management for data consistency
- Seed data initialization
- Custom XML configuration parser
- Validation and error handling
- Caching and performance optimization
- Type-safe configuration access
- Support for complex nested structures
- RESTful endpoint design following best practices
- Proper HTTP status codes and error responses
- Input validation with model binding
- Pagination and filtering support
- Consistent DTO patterns
- Order processing with inventory management
- Payment processing simulation
- Automatic tax and total calculations
- Stock level tracking and validation
- Order status workflow management
GET /api/products
- Get all products with filtering and paginationGET /api/products/{id}
- Get specific productPOST /api/products
- Create new productPUT /api/products/{id}
- Update existing productDELETE /api/products/{id}
- Soft delete productGET /api/products/low-stock
- Get low stock products
POST /api/orders
- Create new orderGET /api/orders/{id}
- Get specific orderGET /api/orders
- Get orders by date rangePATCH /api/orders/{id}/status
- Update order statusPOST /api/orders/{id}/payment
- Process paymentGET /api/orders/{id}/total
- Calculate order total
GET /health
- Health check with database connectivity
POSSystem/
├── Controllers/ # API Controllers
│ ├── ProductsController.cs
│ └── OrdersController.cs
├── Models/ # Domain Models
│ ├── Product.cs
│ ├── Category.cs
│ ├── Order.cs
│ ├── OrderItem.cs
│ └── Customer.cs
├── Data/ # Data Layer
│ └── POSContext.cs
├── Services/ # Business Logic
│ ├── IOrderService.cs
│ └── OrderService.cs
├── Configuration/ # XML Configuration
│ ├── ConfigurationModels.cs
│ ├── XmlConfigurationService.cs
│ └── pos-config.xml
└── Program.cs # Application Startup
The application includes seeded data:
- Categories: Electronics, Clothing, Food & Beverages
- Products: Sample products with stock quantities
- Configuration: Complete XML configuration example
The system uses XML-based configuration for:
- Tax rates and currency settings
- Payment method configuration
- Security policies
- Reporting settings
- Inventory thresholds
Example configuration access:
var taxRate = configService.GetSetting<decimal>("general.taxrate", 0.08m);
- Provides robust ORM capabilities with excellent performance
- Code-first approach for database schema management
- Built-in support for migrations and seeding
- Strong typing and LINQ query support
- Demonstrates XML parsing and manipulation skills
- Provides hierarchical configuration structure
- Supports validation and schema enforcement
- Easily readable and maintainable by non-developers
- Separates business logic from API controllers
- Enables easier unit testing and mocking
- Promotes code reusability and maintainability
- Supports dependency injection patterns
For production deployment, consider:
- Database: Migrate to full SQL Server instance
- Authentication: Add JWT or OAuth2 authentication
- Caching: Implement Redis for performance
- Monitoring: Add Application Insights or similar
- Security: Enable HTTPS, add rate limiting
- Logging: Configure structured logging to external systems
This project demonstrates:
- Clean Architecture: Separation of concerns with proper layering
- SOLID Principles: Dependency inversion, single responsibility
- Error Handling: Comprehensive exception management
- Performance: Async/await patterns, efficient queries
- Maintainability: Clear code structure and documentation
- Testability: Service abstractions and dependency injection
This project is created as a demonstration of backend development skills for evaluation purposes.
Built with care using .NET 9 and modern C# practices