ASP.NET MVC CRUD Tutorial

A comprehensive guide to building and deploying ASP.NET MVC applications

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.

Comprehensive CRUD Implementation

Learn the fundamentals of create, read, update, and delete operations in ASP.NET MVC

Azure Deployment Strategies

Deploy your application using Docker, GitHub Actions, and modern CI/CD pipelines

Scalable Architecture

Build applications that scale with Azure App Services and Virtual Machines

Open-Source Project

Contribute to the project and collaborate with the community

Getting Started

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.

Project Documentation

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

.NET Azure Pipeline Docker Build

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.

Azure Hosting

The application is deployed to multiple Azure environments:

CRUD Implementation Approaches

This application demonstrates multiple ways to implement CRUD operations in ASP.NET:

  1. Traditional MVC: Standard controller-based approach with separate views
  2. Razor Pages: Page-based programming model with encapsulated handlers
  3. Single Page Application: Client-side rendering with AJAX and API calls
  4. 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

  1. Clone the repository: git clone https://github.com/markhazleton/SampleMvcCRUD.git
  2. Open the solution in Visual Studio 2022 or later
  3. Build and run the application locally
  4. 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.