Till slut fick jag personvalet att fungera

This commit is contained in:
2025-09-06 11:59:04 +02:00
parent d3c9dcb208
commit a2d47debfe
11 changed files with 223 additions and 46 deletions

View File

@ -21,9 +21,9 @@ public class GamePointRepository : IRepository<GamePoint>
{
return await _dataContext.GamePoints.FindAsync(id);
}
public async Task<bool> Save(GamePoint entity)
public async Task<int> Save(GamePoint entity)
{
var res = false;
var res = -1;
if ((entity.GameRoundRegNr == 0)
|| (entity.GameRegPoints == 0))
{
@ -34,13 +34,13 @@ public class GamePointRepository : IRepository<GamePoint>
{
_dataContext.GamePoints.Add(entity);
await _dataContext.SaveChangesAsync();
res = true;
res = entity.GamePointId;
}
else
{
_dataContext.GamePoints.Update(entity);
await _dataContext.SaveChangesAsync();
res = true;
res = entity.GamePointId;
}
return res;
}