https://github.com/persteenolsen/dotnet-6-signup-basic-api
A .NET 6 REST API serving as a Membership System using SQLite and EF Core
https://github.com/persteenolsen/dotnet-6-signup-basic-api
dotnet entity-framework-core jwt rest-api sqlite
Last synced: about 2 months ago
JSON representation
A .NET 6 REST API serving as a Membership System using SQLite and EF Core
- Host: GitHub
- URL: https://github.com/persteenolsen/dotnet-6-signup-basic-api
- Owner: persteenolsen
- License: mit
- Created: 2024-03-12T13:36:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-19T13:56:22.000Z (over 2 years ago)
- Last Synced: 2025-06-21T10:05:40.539Z (about 1 year ago)
- Topics: dotnet, entity-framework-core, jwt, rest-api, sqlite
- Language: C#
- Homepage: https://dotnet.signup.basic.api.persteenolsen.com/users
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotnet-6-signup-basic-api
.NET 6.0 - User Registration and Login Tutorial with Example API
# Functionality of the Web App
- JWT authentication
- CRUD Account management routes with role based access control
# Tech used for creating the Web App
- A .NET 6 Web API
- An Angular 14 Web Client for the Frontend
- Entity Framework
- SQLite as a local DB
- SQLite for Production
- A traditional Webhotel for hosting
- VS Code
# Updated EF Core tool to the latest version
dotnet tool update --global dotnet-ef
# Development
Create the Initial Migration for SQLite DB - should work for any DB
set ASPNETCORE_ENVIRONMENT=Development
Make sure that the connection String points to the SQLite ( locally ) in the "appsettings.Development"
"WebApiDatabase": "Data Source=LocalDatabase.db"
dotnet ef migrations add InitialCreate --context SqliteDataContext --output-dir Migrations/SqliteMigrations
# Create the local SQLite
dotnet run
# Production - SQLite as well
Create a self contained build for production at the remote server / traditionel web hotel
dotnet publish webapi.csproj --configuration Release --runtime win-x86 --self-contained
Upload the build to remote server ( without SQLite DB )
At my remote servers the web.config needs to be without the folowing:
hostingModel="inprocess"
# Create the remote SQLite DB
remote-host.com/users