https://github.com/dmunasingha/razor-crud-app
RazorCrudApp is a simple CRUD (Create, Read, Update, Delete) web application built using ASP.NET Core Razor Pages and SQLite. It demonstrates fundamental features like user authentication, secure login/logout with cookies, form validation, and Bootstrap-powered UI for responsiveness. The app is ideal for learning the basics of .NET
https://github.com/dmunasingha/razor-crud-app
asp-net-core bootstrap5 crud csharp css html learn razor-pages web webapp
Last synced: about 2 months ago
JSON representation
RazorCrudApp is a simple CRUD (Create, Read, Update, Delete) web application built using ASP.NET Core Razor Pages and SQLite. It demonstrates fundamental features like user authentication, secure login/logout with cookies, form validation, and Bootstrap-powered UI for responsiveness. The app is ideal for learning the basics of .NET
- Host: GitHub
- URL: https://github.com/dmunasingha/razor-crud-app
- Owner: dmunasingha
- Created: 2025-06-17T18:26:51.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-17T19:09:23.000Z (about 1 year ago)
- Last Synced: 2025-06-17T19:56:08.038Z (about 1 year ago)
- Topics: asp-net-core, bootstrap5, crud, csharp, css, html, learn, razor-pages, web, webapp
- Language: HTML
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RazorCrudApp
A simple CRUD web application built with ASP.NET Core Razor Pages, featuring:
* User Authentication (Login / Logout)
* SQLite Database Integration
* Toast Notifications using Bootstrap
* Entity Framework Core (EF Core) with Code-First Migrations
---
## ๐ Features
* ๐งโ๐ผ User Authentication with Cookie-based login/logout
* ๐ฆ SQLite database
* ๐ CRUD operations on User Model (or any other data model)
* ๐ฌ Bootstrap Toast Notifications
* ๐ Razor Pages + Layout + Partial Integration
---
## ๐ ๏ธ Setup Instructions
### Prerequisites
* [.NET 6 or later SDK](https://dotnet.microsoft.com/en-us/download)
* (Optional) Visual Studio 2022+ / VS Code
* SQLite Explorer (like DB Browser for SQLite)
---
### โ๏ธ Getting Started
1. **Clone the Repository**
```bash
git clone https://github.com/yourusername/RazorCrudApp.git
cd RazorCrudApp
```
2. **Restore Dependencies**
```bash
dotnet restore
```
3. **Add EF Core Tools (if not already installed)**
```bash
dotnet tool install --global dotnet-ef
```
4. **Apply Migrations and Create the Database**
```bash
dotnet ef migrations add InitialCreate
dotnet ef database update
```
5. **Run the Application**
```bash
dotnet run
```
---
## ๐ฅช Usage
* Visit: `https://localhost:5001`
* Use the Login form to authenticate.
* Use navigation bar to perform CRUD actions.
* Use Toasts for visual feedback on actions.
---
## ๐งน Folder Structure
```
/Pages
/Auth # Login, Logout pages
/Users # CRUD pages for users
/Models
User.cs # User model
/Data
AppDbContext.cs
```
---
## ๐ฆ Dependencies
* ASP.NET Core Razor Pages
* Microsoft.EntityFrameworkCore.Sqlite
* Microsoft.AspNetCore.Authentication.Cookies
* Bootstrap 5
* jQuery
---
## ๐ซฏ Troubleshooting
### Issue: `no such table: Users`
Run migrations and update database:
```bash
dotnet ef migrations add InitialCreate
dotnet ef database update
```
### Issue: `The file is being used by another process`
Close the app or watcher, then run:
```bash
taskkill /f /im RazorCrudApp.exe
dotnet clean
dotnet build
```
---
## ๐ License
MIT License. Feel free to use and contribute!
---
## ๐ค Contributing
Pull requests are welcome. For major changes, open an issue first to discuss what you'd like to change.
---
## โ๏ธ Author
**Dunith Munasingha**
Sri Lanka
Software Engineer
---