Properly add game upon save

blazor
Pat Hartl 2023-03-03 18:58:05 -06:00
parent 57eb454dcc
commit 171e01cf08
1 changed files with 11 additions and 2 deletions

View File

@ -166,9 +166,18 @@
{
try
{
Game = await GameService.Update(Game);
if (Game.Id != Guid.Empty)
{
Game = await GameService.Update(Game);
await MessageService.Success("Game updated!");
await MessageService.Success("Game updated!");
}
else
{
Game = await GameService.Add(Game);
await MessageService.Success("Game added!");
}
}
catch (Exception ex)
{