Till slut fick jag personvalet att fungera
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user