Welcome to the ASP.NET MVC CRUD Tutorial
This sample CRUD application demonstrates how to create, read, update, and delete records using ASP.NET MVC. It covers various deployment strategies to Azure, including using Docker and GitHub Actions for continuous integration and deployment. Whether you're a beginner looking to understand the basics of MVC or an experienced developer exploring advanced deployment methods, this tutorial offers a comprehensive guide.
Features of this Sample CRUD Application:
- Comprehensive ASP.NET MVC CRUD implementation
- Azure deployment strategies using Docker and GitHub Actions
- Scalable architecture with support for Azure App Services and Virtual Machines
- Open-source project with opportunities for contributions
Ready to get started? Explore the code and follow the steps to deploy your own ASP.NET MVC application to Azure. Stay tuned for upcoming features like integration with React, Vue, and mobile applications.
Why Choose This Tutorial?
This project is designed to help developers at all levels understand the best practices for building and deploying ASP.NET MVC applications. By following this guide, you will learn how to efficiently manage the lifecycle of an MVC application, from development to production, using modern DevOps practices.
Project Readme.MD
SampleMvcCRUD
A modern .NET application demonstrating multiple approaches for implementing CRUD (Create, Read, Update, Delete) operations through various web interfaces and deployment strategies.
Overview
This project showcases best practices for building and deploying ASP.NET MVC applications with a focus on:
- Modern UI with Bootstrap 5 and Bootstrap Icons
- Mobile-first responsive design
- Multiple CRUD implementation approaches
- Azure cloud deployment strategies
- Continuous Integration/Continuous Deployment (CI/CD) pipelines
Technologies & Frameworks
- ASP.NET Core MVC
- .NET 8 with C#
- Entity Framework Core
- Bootstrap 5 & Bootstrap Icons
- jQuery & DataTables
- PivotTable.js for data visualization
- Swagger/OpenAPI for API documentation
Deployment Options
Docker Containers
The application is containerized using Docker with automated builds on GitHub Actions. The Docker image is published to Docker Hub with each update to the main branch.
- Docker Hub: markhazleton/mwhsampleweb
- Pull Command:
docker pull markhazleton/mwhsampleweb:latest
Azure Hosting
The application is deployed to multiple Azure environments:
Azure App Service (Linux): https://samplecrud.azurewebsites.net/
Deployed via GitHub Actions CI/CD pipelineAzure Virtual Machine (IIS): https://samplecrud.markhazleton.com/
Traditional Windows hosting with IIS
CRUD Implementation Approaches
This application demonstrates multiple ways to implement CRUD operations in ASP.NET:
- Traditional MVC: Standard controller-based approach with separate views
- Razor Pages: Page-based programming model with encapsulated handlers
- Single Page Application: Client-side rendering with AJAX and API calls
- DataTables Integration: Server-side processing with client-side rendering
Azure DevOps Integration
The project leverages Azure services for comprehensive ALM (Application Lifecycle Management):
- Azure DevOps Pipelines: Automated build and deployment workflows
- Azure Application Insights: Real-time performance monitoring and diagnostics
- Azure Key Vault: Secure secrets management
- GitHub Integration: Source control with branch protection and PR workflows
Key Features
- Comprehensive API Documentation: Swagger UI for testing and exploring APIs
- Multiple UI Paradigms: Different approaches to solving the same problems
- Modern Responsive Interface: Mobile-first design with Bootstrap 5
- Containerized Deployment: Docker support for cloud-native architectures
- Security Best Practices: HTTPS, secure authentication, and input validation
Getting Started
- Clone the repository:
git clone https://github.com/markhazleton/SampleMvcCRUD.git
- Open the solution in Visual Studio 2022 or later
- Build and run the application locally
- Explore the different implementation approaches in the navigation menu
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Mark Hazleton - Software Architect & .NET Developer
License
Copyright 2018-2025 Mark Hazleton
Code released under the MIT License.