Fix reference empty guid

This commit is contained in:
2023-10-23 21:42:56 +02:00
parent 3f538fc34e
commit 136ce48385
3 changed files with 9 additions and 5 deletions

View File

@@ -4,8 +4,8 @@ namespace GerbilManagerWebAPI.Dtos
{ {
public required string Name { get; init; } public required string Name { get; init; }
public required GenderDto Gender { get; init; } public required GenderDto Gender { get; init; }
public Guid? Litter { get; init; } public Guid Litter { get; init; }
public Guid? Breeder { get; init; } public Guid Breeder { get; init; }
} }
} }

View File

@@ -5,7 +5,7 @@ namespace GerbilManagerWebAPI.Dtos
public required string Name { get; init; } public required string Name { get; init; }
public required DateTime Date { get; init; } public required DateTime Date { get; init; }
public int? Strength { get; init; } public int? Strength { get; init; }
public Guid? Father { get; init; } public Guid Father { get; init; }
public Guid? Mother { get; init; } public Guid Mother { get; init; }
} }
} }

View File

@@ -9,4 +9,8 @@ docker compose up
## Create the initial database ## Create the initial database
dotnet ef database update dotnet ef database update
## Create an migration script ## Create an migration script
dotnet ef migrations add <name> dotnet ef migrations add <name>
TODO:
Backup docker volume database