Simple .NET 8 template with everything set up to show basic movie data with CRUD and server side HTML rendering
-
Windows 10
-
Linux DB migrations don't work but everything else works.
for linux systems try re-creating the migrations or updating the packages to a different sqlite library. Also check all of the filepaths in the code including in package.json.
HTMX is superior in terms of the amount of boilerplate needed compared to razor. No need to write Javascript for AJAX Calls and this produces cleaner code overall. The goal in using HTMX is to avoid writing JS as much as possible, producing simpler code.
Before you begin, ensure you have the following installed:
- .NET 8.0 SDK
- Entity Framework Core CLI
dotnet tool install --global dotnet-ef
To get a local copy up and running follow these simple steps:
-
Install necessary packages
Make sure all the required NuGet and NPM packages are restored:
dotnet restore npm install
-
Run Migrations
Apply the database migrations to set up your database schema:
dotnet ef database update
-
Build css
Build tailwind css. (Change this as you see fit into one build script for convenience, add hot reloading for views on build, there should be a way)
npm run build:css
Start the API locally by running the code below, or start it in visual studio with IIS
dotnet run