Calculate the results from the Agnostic data structure

This commit is contained in:
2022-03-20 21:10:20 +01:00
parent ee48b7d75c
commit eb3eb3e779
5 changed files with 119 additions and 12 deletions

View File

@@ -20,8 +20,18 @@ namespace LaDOSE.Business.Service
//var p2 = _context.Player.ToList();
var p = _context.Player.FirstOrDefault(e => e.SmashId == participantUser.user.id);
if (p == null)
{
p = _context.Player.FirstOrDefault(e => e.Gamertag.ToUpper() == participantUser.gamerTag.ToUpper());
if (p != null)
{
if (p.SmashId == null)
{
p.SmashId = participantUser.user.id;
}
return p.Id;
}
var entity = new Player()
{
Gamertag = participantUser.gamerTag,
@@ -49,7 +59,7 @@ namespace LaDOSE.Business.Service
{
challongeParticipent.Name = "UNKNOWPLAYER";
}
var p = _context.Player.FirstOrDefault(e => e.Gamertag == challongeParticipent.Name);
var p = _context.Player.FirstOrDefault(e => e.Gamertag.ToUpper() == challongeParticipent.Name.ToUpper());
if (p == null)
{
var entity = new Player()