public async Task PostUser([FromBody] User user)
        {
            using (var dbContext = new GamesDbContext())
            {
                var currentUser = await dbContext.User.Where(x => x.Email == user.Email).FirstOrDefaultAsync();

                if (currentUser == null)
                {
                    user.Id = Guid.NewGuid();
                    await dbContext.Add(user);
                }
                else
                {
                    currentUser.Email = user.Email;
                    currentUser.Name  = user.Name;
                    await dbContext.Edit(currentUser);
                }
                await dbContext.SaveChangesAsync();
            }
        }
        public async Task <IHttpActionResult> PostUser([FromBody] User user, [FromUri] int bestScore = 0)
        {
            Guid userId;

            using (var dbContext = new GamesDbContext())
            {
                var currentUser = await dbContext.User.Where(x => x.Email == user.Email).FirstOrDefaultAsync();

                if (currentUser == null)
                {
                    userId  = Guid.NewGuid();
                    user.Id = userId;
                    await dbContext.Add(user);
                }
                else
                {
                    currentUser.Email = user.Email;
                    currentUser.Name  = user.Name;
                    userId            = currentUser.Id;
                    await dbContext.Edit(currentUser);
                }
                if (bestScore > 0)
                {
                    var currentGameScore = await dbContext.Score.Where(x => x.UserId == userId && x.ScorePoint == bestScore).FirstOrDefaultAsync();

                    if (currentGameScore == null)
                    {
                        await dbContext.Add(new Score {
                            UserId     = userId,
                            GameId     = 1,
                            Id         = Guid.NewGuid(),
                            ScorePoint = bestScore
                        });
                    }
                }
                await dbContext.SaveChangesAsync();

                return(Ok());
            }
        }