62 Commits

Author SHA1 Message Date
150f500675 Consolidate relationship migrations into single migration.
This is due to an error rising, another error is rising at this point when trying to update the database:
SQLite Error 19: 'NOT NULL constraint failed: Teams.LeagueId'.
2025-04-07 11:33:49 +02:00
0cacdd7b33 Add migration one to one Coach to Team relationship. 2025-04-07 11:22:05 +02:00
b0e653ab0d Add one to one relationship between Coach and Team.
A Coach is parent, Team is child.
A Coach can exist on his own, without a Team, but a Team cannot play without a Coach.
2025-04-07 11:21:48 +02:00
1813bf6362 Add migration for many to many relationships between Matches and Teams. 2025-04-07 11:11:46 +02:00
804943486f Add relationship and foreign key configurations between Match and Team. 2025-04-07 11:09:42 +02:00
c73a72204d Update README with relationships. 2025-04-07 10:53:03 +02:00
42edf6cccf Add migration to make relation League to Team nullable. 2025-04-07 10:45:09 +02:00
e852f09f09 Make relation of League to Team nullable. 2025-04-07 10:44:41 +02:00
1230476b27 Add migration to add relationship between League and Team. 2025-04-07 10:43:29 +02:00
a0733b4ebb Add relationship between League and Team. 2025-04-07 10:43:14 +02:00
b1f99dc57a Ensure database created on startup. 2025-04-07 10:22:05 +02:00
e863015075 Add migration to add Team ID to Coach. 2025-04-07 10:17:02 +02:00
48afe784d6 Add TeamId to Coach model. 2025-04-07 10:16:41 +02:00
1197b9ecea Update README with rollback and list commands. 2025-04-07 10:13:55 +02:00
b114a696a0 Update README with migration script. 2025-04-06 23:35:37 +02:00
f630dfac2c Add migration for seeded leagues. 2025-04-06 21:07:11 +02:00
7f5ecb9d3a Add Configurations for Teams and Leagues. 2025-04-06 21:06:59 +02:00
fd915cc972 Add migration to add Name to League. 2025-04-06 20:32:41 +02:00
808a6d6a3e Add Name property to League model. 2025-04-06 20:30:17 +02:00
1a8cafbc4a Add migration to remove TeamID. 2025-04-06 20:10:59 +02:00
278064b19b Remove Team ID from Team model.
This is done to create a proper change to let Id now be the Primary Key.
2025-04-06 20:10:36 +02:00
f137595a5a Add migration to add Match and League entities. 2025-04-06 20:06:01 +02:00
a49717ff49 Update snapshot to make properties nullable. 2025-04-06 19:59:45 +02:00
cccd9ba8e0 Change BaseDomainModel properties CreatedBy and ModifiedBy to be nullable. 2025-04-06 11:51:15 +02:00
63a09998ac Add auditable properties to BaseDomainModel. 2025-04-06 11:35:38 +02:00
4175eea10c Provide Team model with LeagueId and CoachId. 2025-04-06 11:35:10 +02:00
2477d2b080 Create new domain models for Match and League. 2025-04-06 11:34:53 +02:00
ba3c65d7a1 Move Id to BaseDomainModel and replace TeamId with regular Id. 2025-04-06 11:27:13 +02:00
10d207cb44 add examples for ExecuteDelete and ExecuteUpdate functions. 2025-04-05 23:33:19 +02:00
86b2e60e8c Add example delete for coach. 2025-04-05 23:26:53 +02:00
f58ce8f120 Add update example with no-tracking for coach. 2025-04-05 23:23:52 +02:00
963378f2e9 Add insert example. 2025-04-05 23:06:01 +02:00
5a2a82b413 Comment out and remove unused code. 2025-04-05 23:05:42 +02:00
29aebcea18 Update README. 2025-04-05 22:10:15 +02:00
915434f44d Add example showing difference between directly toList or using IQueryable. 2025-04-05 21:48:12 +02:00
1aae643a78 Add example query with tracking disabled.
This can also be done globally, see context file.
2025-04-05 21:29:48 +02:00
51eb8b117a Add examples with selecting specific columns and using a DTO. 2025-04-05 20:54:19 +02:00
b715fd3150 Add example skip-and-take query function. 2025-04-05 18:42:59 +02:00
f4978d215e Add example functions for ordered and grouped queries. 2025-04-05 18:31:55 +02:00
e542616532 Add example counting query functions. 2025-04-05 17:49:45 +02:00
2ef3859d2a Add example basic query functions. 2025-04-05 17:23:44 +02:00
61b0e99f94 Create example queries in Console project. 2025-04-05 00:19:28 +02:00
23a75282c1 Update README file. 2025-04-04 23:31:13 +02:00
25ede5cc28 Add logging to Entity Framework Core workload. 2025-04-04 20:12:03 +02:00
6e0167a051 Seed database with Teams. 2025-04-04 19:36:19 +02:00
451fb50cd8 Add comment to DbContext about where the database file is created. 2025-04-04 17:58:59 +02:00
5b3c661b67 Create initial migration.
deadballzone/EntityFrameworkCore.Console(master)$
dotnet ef migrations add InitialMigration --startup-project ./ --project ../EntityFrameworkCore.Data
2025-04-04 17:28:08 +02:00
de4c0d390c Update README. 2025-04-04 17:21:24 +02:00
a8b59a8ca2 Create DbContext file. 2025-04-04 17:21:16 +02:00
f58f92d0e0 Install Sqlite database provider for Entity Framework in Data project. 2025-04-04 17:20:57 +02:00