LANCommander/LANCommander.Server.Data
Pat Hartl 3fe6bea7e5 Added "Preview" edit view, flesh out media picker
- Added sort order to media for screenshots and videos
- Added new "Preview" pane to game editor. Simulates the game details view in the launcher and allows for in-place media upload / grabbing
- Added abstractions for media grabbing
- Added subtitle to media picker dialog to indicate which services provide which assets
- Added preview for videos
- Made media searching faster overall
2026-04-24 02:05:56 -05:00
..
Enums Refactor Settings 2025-11-16 12:31:25 -06:00
Extensions Adjust Blazor server-side to pull data with new context 2024-11-25 22:29:56 -06:00
Interceptors Database intercepter to sanitize game saves (like recursion and kept base game reference) 2025-05-18 19:46:42 +02:00
Models Added "Preview" edit view, flesh out media picker 2026-04-24 02:05:56 -05:00
DatabaseContext.cs Add ratings to DB. Add popular/backlog games to depot. 2026-04-01 23:13:33 -05:00
DatabaseContextFactory.cs Fix ability to add database migrations 2026-01-10 20:02:45 -06:00
LANCommander.Server.Data.csproj Bump to .NET 10 2026-04-10 02:19:50 -05:00
ModelBuilderExtensions.cs Use custom models for identities 2024-10-15 23:48:16 -05:00
PaginatedResults.cs Add DataTable component 2024-12-12 17:35:52 -06:00
README.md Rename identity tables 2024-10-15 20:48:06 -05:00
UpdateEntityContext.cs Fix certain taxonomies (tag, genre, platform) being removed from game on save 2025-12-08 00:51:32 -06:00

LANCommander.Server.Data

This is the main assembly for defining database schema and the database context for Entity Framework Core.

Adding Migrations

Migrations should only be added to the database provider projects. The following commands can be used to add a new migration:

dotnet ef migrations add <Migration Name> --project LANCommander.Server.Data.SQLite --startup-project LANCommander.Server -- --database-provider=SQLite --connection-string="Data Source=LANCommander.db;Cache=Shared"
dotnet ef migrations add <Migration Name> --project LANCommander.Server.Data.MySQL --startup-project LANCommander.Server -- --database-provider=MySQL --connection-string="Server=localhost;Uid=root;Pwd=password;Database=LANCommander"
dotnet ef migrations add <Migration Name> --project LANCommander.Server.Data.PostgreSQL --startup-project LANCommander.Server -- --database-provider=PostgreSQL --connection-string="Host=localhost;Port=5432;Database=LANCommander;User Id=postgres;Password=password"

A migration should be added to every database provider. Note that when running each of these, Settings.yml needs to be updated with the correct connection strings.

If something with the parsing of the database provider or connection string arguments needs to be looked at, you can add --debugger for the application to wait until a debugger is attached.