dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.77k stars 3.18k forks source link

Issue Updating Complex Graph in 3.0 #18213

Closed Joseph-Anthony-King closed 2 years ago

Joseph-Anthony-King commented 5 years ago

I'm having an issue updating a complex graph in EF 3.0 and I've found a work around... but I'm not really happy with it and I suspect this is a bug. I'm building a sudoku api and the basic model is as follows:

Users (User Member)Have a list of roles describing their authorizations with the apps (User Member)Have a list of licensed apps they can log into (User Member)Have a list of games (Game Member)Has a matrix composed of 9 rows/columns/regions which make the puzzle (Matrix Member)Has 81 "cells" which hold the value

All entities inherit from a custom interface ISudokuObject that declares the ID property:

namespace SudokuCollective.Models.Interfaces {

    public interface ISudokuOject {

        int Id { get; set; }
    }
}

Whenever I create new games and save it to the database the user looses their references to their apps, games, and roles. I wanted to do the following:

            try {

                User user;
                Difficulty difficulty;

                var userResult = await _userService.GetUser(createGameRO.UserId);
                var difficultyResult =
                    await _difficultiesService.GetDifficulty(createGameRO.DifficultyId);

                if (userResult.Success && difficultyResult.Success) {

                    user = userResult.User;
                    difficulty = difficultyResult.Difficulty;

                    SudokuMatrix matrix = new SudokuMatrix();
                    matrix.GenerateSolution();

                    var game = new Game(
                        user,
                        matrix,
                        difficulty);

                    _context.ChangeTracker.TrackGraph(user, 
                        e => {

                            if (e.Entry.Entity is User) {

                                e.Entry.State = EntityState.Unchanged;

                            } else if (e.Entry.Entity is UserApp) {

                                e.Entry.State = EntityState.Unchanged;

                            } else if (e.Entry.Entity is UserRole) {

                                e.Entry.State = EntityState.Unchanged;

                            } else if (e.Entry.Entity is Difficulty) {

                                e.Entry.State = EntityState.Unchanged;

                            } else if (e.Entry.Entity is Game) {

                                var dbEntry = (ISudokuOject)e.Entry.Entity;

                                if (dbEntry.Id != 0) {

                                    e.Entry.State = EntityState.Unchanged;

                                } else {

                                    e.Entry.State = EntityState.Added;
                                }

                            }
                            else {

                                var dbEntry = (ISudokuOject)e.Entry.Entity;

                                if (dbEntry.Id != 0) {

                                    e.Entry.State = EntityState.Modified;

                                } else {

                                    e.Entry.State = EntityState.Added;
                                }
                            }
                        });

                    await _context.SaveChangesAsync();

                    gameTaskResult.Success = true;
                    gameTaskResult.Game = game;

                } else {

                    gameTaskResult.Message = "Could not find the user or difficulty in the database";
                }

                return gameTaskResult;

            }

But the issue persists... so now I have to pull references to the apps, roles, and games before I add the game to the context... then I add the apps, roles, and games back. It works but it's messy and I suspect there is a bug.

            try {

                User user;
                Difficulty difficulty;

                var userResult = await _userService.GetUser(createGameRO.UserId);
                var difficultyResult =
                    await _difficultiesService.GetDifficulty(createGameRO.DifficultyId);

                if (userResult.Success && difficultyResult.Success) {

                    user = userResult.User;
                    difficulty = difficultyResult.Difficulty;

                    var userApps = user.Apps;
                    var userRoles = user.Roles;
                    var userGames = user.Games;

                    SudokuMatrix matrix = new SudokuMatrix();
                    matrix.GenerateSolution();

                    var game = new Game(
                        user,
                        matrix,
                        difficulty);

                    _context.ChangeTracker.TrackGraph(user, 
                        e => {

                            if (e.Entry.Entity is User) {

                                e.Entry.State = EntityState.Unchanged;

                            } else if (e.Entry.Entity is Difficulty) {

                                e.Entry.State = EntityState.Unchanged;

                            } else {

                                var dbEntry = (ISudokuOject)e.Entry.Entity;

                                if (dbEntry.Id != 0) {

                                    e.Entry.State = EntityState.Modified;

                                } else {

                                    e.Entry.State = EntityState.Added;
                                }
                            }
                        });

                    foreach (var userApp in userApps) {

                        _context.Entry<UserApp>(userApp).State = EntityState.Unchanged;
                    }

                    foreach (var userRole in userRoles) {

                        _context.Entry<UserRole>(userRole).State = EntityState.Unchanged;
                    }

                    foreach (var userGame in userGames) {

                        if (userGame.Id != 0) {

                            _context.Entry<Game>(userGame).State = EntityState.Unchanged;

                        } else {

                            _context.Entry<Game>(userGame).State = EntityState.Added;
                        }
                    }

                    await _context.SaveChangesAsync();

                    gameTaskResult.Success = true;
            gameTaskResult.Game = game;

                } else {

                    gameTaskResult.Message = "Could not find the user or difficulty in the database";
                }

                return gameTaskResult;

            }

In my original implementation it should recognize the apps, games, and roles and leave them unchanged... yet it is deleting them. Am I missing something or is this a bug?

Joseph-Anthony-King commented 5 years ago

The code in full can be reviewed at: https://github.com/Joseph-Anthony-King/SudokuCollective/blob/master/SudokuCollective.WebApi/Services/GamesService.cs

Joseph-Anthony-King commented 5 years ago

Additionally, for troubleshooting purposes I removed:

                    foreach (var userApp in userApps) {

                        _context.Entry<UserApp>(userApp).State = EntityState.Unchanged;
                    }

                    foreach (var userRole in userRoles) {

                        _context.Entry<UserRole>(userRole).State = EntityState.Unchanged;
                    }

                    foreach (var userGame in userGames) {

                        if (userGame.Id != 0) {

                            _context.Entry<Game>(userGame).State = EntityState.Unchanged;

                        } else {

                            _context.Entry<Game>(userGame).State = EntityState.Added;
                        }
                    }

I then reviewed the generated SQL and noted the following:

      DELETE FROM "UsersApps"
      WHERE "Id" = @p2;
      DELETE FROM "UsersRoles"
      WHERE "Id" = @p3;
      DELETE FROM "UsersRoles"
      WHERE "Id" = @p4;

This does appear to be a bug... especially since I specifically reviewed entities in the track graph method and marked UserApps, and UserRoles as unchanged.

The full generated SQL script is being attached.

Joseph-Anthony-King commented 5 years ago
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 3.0.0 initialized 'ApplicationDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__license_0='?'], CommandType='Text', CommandTimeout='30']
      SELECT EXISTS (
          SELECT 1
          FROM "Apps" AS a
          WHERE ((a."License" = @__license_0) AND ((a."License" IS NOT NULL) AND (@__license_0 IS NOT NULL))) OR ((a."License" IS NULL) AND (@__license_0 IS NULL)))
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__license_0='?'], CommandType='Text', CommandTimeout='30']
      SELECT t."Id", t."DateCreated", t."DateUpdated", t."DevUrl", t."IsActive", t."License", t."LiveUrl", t."Name", t."OwnerId", u."Id", u."AppId", u."UserId"
      FROM (
          SELECT a."Id", a."DateCreated", a."DateUpdated", a."DevUrl", a."IsActive", a."License", a."LiveUrl", a."Name", a."OwnerId"
          FROM "Apps" AS a
          WHERE ((a."License" = @__license_0) AND ((a."License" IS NOT NULL) AND (@__license_0 IS NOT NULL))) OR ((a."License" IS NULL) AND (@__license_0 IS NULL))
          LIMIT 1
      ) AS t
      LEFT JOIN "UsersApps" AS u ON t."Id" = u."AppId"
      ORDER BY t."Id", u."Id"
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__userApp_UserId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT u."Id", u."DateCreated", u."DateUpdated", u."Email", u."FirstName", u."IsActive", u."LastName", u."NickName", u."Password", u."UserName"
      FROM "Users" AS u
      WHERE (u."Id" = @__userApp_UserId_0) AND (@__userApp_UserId_0 IS NOT NULL)
      LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT t."Id", t."DateCreated", t."DateUpdated", t."Email", t."FirstName", t."IsActive", t."LastName", t."NickName", t."Password", t."UserName", g."Id", g."ContinueGame", g."DateCompleted", g."DateCreated", g."SudokuMatrixId", g."SudokuSolutionId", g."UserId", u0."Id", u0."RoleId", u0."UserId", u1."Id", u1."AppId", u1."UserId"
      FROM (
          SELECT u."Id", u."DateCreated", u."DateUpdated", u."Email", u."FirstName", u."IsActive", u."LastName", u."NickName", u."Password", u."UserName"
          FROM "Users" AS u
          WHERE (u."Id" = @__id_0) AND (@__id_0 IS NOT NULL)
          LIMIT 1
      ) AS t
      LEFT JOIN "Games" AS g ON t."Id" = g."UserId"
      LEFT JOIN "UsersRoles" AS u0 ON t."Id" = u0."UserId"
      LEFT JOIN "UsersApps" AS u1 ON t."Id" = u1."UserId"
      ORDER BY t."Id", g."Id", u0."Id", u1."Id"
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__game_SudokuMatrixId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT s."Id", s."DifficultyId", d."Id", d."DifficultyLevel", d."DisplayName", d."Name"
      FROM "SudokuMatrices" AS s
      INNER JOIN "Difficulties" AS d ON s."DifficultyId" = d."Id"
      WHERE (s."Id" = @__game_SudokuMatrixId_0) AND (@__game_SudokuMatrixId_0 IS NOT NULL)
      LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__sudokuMatrix_Id_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT s."Id", s."Column", s."DisplayValue", s."Index", s."Obscured", s."Region", s."Row", s."SudokuMatrixId", s."Value"
      FROM "SudokuCells" AS s
      INNER JOIN "SudokuMatrices" AS s0 ON s."SudokuMatrixId" = s0."Id"
      WHERE (s0."Id" = @__sudokuMatrix_Id_0) AND (@__sudokuMatrix_Id_0 IS NOT NULL)
      ORDER BY s."Index"
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__userRole_RoleId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT r."Id", r."Name", r."RoleLevel"
      FROM "Roles" AS r
      WHERE (r."Id" = @__userRole_RoleId_0) AND (@__userRole_RoleId_0 IS NOT NULL)
      LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__userRole_RoleId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT r."Id", r."Name", r."RoleLevel"
      FROM "Roles" AS r
      WHERE (r."Id" = @__userRole_RoleId_0) AND (@__userRole_RoleId_0 IS NOT NULL)
      LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__userApp_AppId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT a."Id", a."DateCreated", a."DateUpdated", a."DevUrl", a."IsActive", a."License", a."LiveUrl", a."Name", a."OwnerId"
      FROM "Apps" AS a
      WHERE (a."Id" = @__userApp_AppId_0) AND (@__userApp_AppId_0 IS NOT NULL)
      LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT t."Id", t."DifficultyLevel", t."DisplayName", t."Name", s."Id", s."DifficultyId"
      FROM (
          SELECT d."Id", d."DifficultyLevel", d."DisplayName", d."Name"
          FROM "Difficulties" AS d
          WHERE (d."Id" = @__id_0) AND (@__id_0 IS NOT NULL)
          LIMIT 2
      ) AS t
      LEFT JOIN "SudokuMatrices" AS s ON t."Id" = s."DifficultyId"
      ORDER BY t."Id", s."Id"
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__difficulty_Id_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT s."Id", s."DifficultyId"
      FROM "SudokuMatrices" AS s
      INNER JOIN "Difficulties" AS d ON s."DifficultyId" = d."Id"
      WHERE (d."Id" = @__difficulty_Id_0) AND (@__difficulty_Id_0 IS NOT NULL)
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__matrix_Id_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT s."Id", s."Column", s."DisplayValue", s."Index", s."Obscured", s."Region", s."Row", s."SudokuMatrixId", s."Value"
      FROM "SudokuCells" AS s
      INNER JOIN "SudokuMatrices" AS s0 ON s."SudokuMatrixId" = s0."Id"
      WHERE (s0."Id" = @__matrix_Id_0) AND (@__matrix_Id_0 IS NOT NULL)
      ORDER BY s."Index"
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@p0='?' (DbType = Int32), @p1='?', @p2='?' (DbType = Int32), @p3='?' (DbType = Int32), @p4='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      INSERT INTO "SudokuMatrices" ("DifficultyId")
      VALUES (@p0)
      RETURNING "Id";
      INSERT INTO "SudokuSolutions" ("SolutionList")
      VALUES (@p1)
      RETURNING "Id";
      DELETE FROM "UsersApps"
      WHERE "Id" = @p2;
      DELETE FROM "UsersRoles"
      WHERE "Id" = @p3;
      DELETE FROM "UsersRoles"
      WHERE "Id" = @p4;
info: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@p5='?' (DbType = Boolean), @p6='?' (DbType = DateTime), @p7='?' (DbType = DateTime), @p8='?' (DbType = Int32), @p9='?' (DbType = Int32), @p10='?' (DbType = Int32), @p11='?' (DbType = Int32), @p12='?' (DbType = Int32), @p13='?' (DbType = Int32), @p14='?' (DbType = Boolean), @p15='?' (DbType = Int32), @p16='?' (DbType = Int32), @p17='?' (DbType = Int32), @p18='?' (DbType = Int32), @p19='?' (DbType = Int32), @p20='?' (DbType = Int32), @p21='?' (DbType = Int32), @p22='?' (DbType = Boolean), @p23='?' (DbType = Int32), @p24='?' (DbType = Int32), @p25='?' (DbType = Int32), @p26='?' (DbType = Int32), @p27='?' (DbType = Int32), @p28='?' (DbType = Int32), @p29='?' (DbType = Int32), @p30='?' (DbType = Boolean), @p31='?' (DbType = Int32), @p32='?' (DbType = Int32), @p33='?' (DbType = Int32), @p34='?' (DbType = Int32), @p35='?' (DbType = Int32), @p36='?' (DbType = Int32), @p37='?' (DbType = Int32), @p38='?' (DbType = Boolean), @p39='?' (DbType = Int32), @p40='?' (DbType = Int32), @p41='?' (DbType = Int32), @p42='?' (DbType = Int32), @p43='?' (DbType = Int32), @p44='?' (DbType = Int32), @p45='?' (DbType = Int32), @p46='?' (DbType = Boolean), @p47='?' (DbType = Int32), @p48='?' (DbType = Int32), @p49='?' (DbType = Int32), @p50='?' (DbType = Int32), @p51='?' (DbType = Int32), @p52='?' (DbType = Int32), @p53='?' (DbType = Int32), @p54='?' (DbType = Boolean), @p55='?' (DbType
= Int32), @p56='?' (DbType = Int32), @p57='?' (DbType = Int32), @p58='?' (DbType = Int32), @p59='?' (DbType = Int32), @p60='?' (DbType = Int32), @p61='?' (DbType = Int32), @p62='?' (DbType = Boolean), @p63='?' (DbType = Int32), @p64='?' (DbType = Int32), @p65='?' (DbType = Int32), @p66='?' (DbType = Int32), @p67='?' (DbType = Int32), @p68='?' (DbType = Int32), @p69='?' (DbType = Int32), @p70='?' (DbType = Boolean), @p71='?' (DbType = Int32), @p72='?' (DbType = Int32), @p73='?' (DbType = Int32), @p74='?' (DbType = Int32), @p75='?' (DbType = Int32), @p76='?' (DbType = Int32), @p77='?' (DbType = Int32), @p78='?' (DbType = Boolean), @p79='?' (DbType = Int32), @p80='?' (DbType = Int32), @p81='?' (DbType = Int32), @p82='?' (DbType = Int32), @p83='?' (DbType = Int32), @p84='?' (DbType = Int32), @p85='?' (DbType = Int32), @p86='?' (DbType = Boolean), @p87='?' (DbType = Int32), @p88='?' (DbType = Int32), @p89='?' (DbType = Int32), @p90='?' (DbType = Int32), @p91='?' (DbType = Int32), @p92='?' (DbType = Int32), @p93='?' (DbType = Int32), @p94='?' (DbType = Boolean), @p95='?' (DbType = Int32), @p96='?' (DbType = Int32), @p97='?' (DbType = Int32), @p98='?' (DbType = Int32), @p99='?' (DbType = Int32), @p100='?'
(DbType = Int32), @p101='?' (DbType = Int32), @p102='?' (DbType = Boolean), @p103='?' (DbType = Int32), @p104='?' (DbType = Int32), @p105='?' (DbType = Int32), @p106='?' (DbType = Int32), @p107='?' (DbType = Int32), @p108='?' (DbType = Int32), @p109='?' (DbType = Int32), @p110='?' (DbType = Boolean), @p111='?' (DbType = Int32), @p112='?' (DbType = Int32), @p113='?' (DbType = Int32), @p114='?' (DbType =
Int32), @p115='?' (DbType = Int32), @p116='?' (DbType = Int32), @p117='?' (DbType = Int32), @p118='?' (DbType = Boolean), @p119='?' (DbType = Int32), @p120='?' (DbType = Int32), @p121='?' (DbType = Int32), @p122='?' (DbType = Int32), @p123='?' (DbType = Int32), @p124='?' (DbType = Int32), @p125='?' (DbType = Int32), @p126='?' (DbType = Boolean), @p127='?' (DbType = Int32), @p128='?' (DbType = Int32), @p129='?' (DbType = Int32), @p130='?' (DbType = Int32), @p131='?' (DbType = Int32), @p132='?' (DbType = Int32), @p133='?' (DbType = Int32), @p134='?' (DbType = Boolean), @p135='?' (DbType = Int32), @p136='?' (DbType = Int32), @p137='?' (DbType = Int32), @p138='?' (DbType = Int32), @p139='?' (DbType = Int32), @p140='?' (DbType = Int32), @p141='?' (DbType = Int32), @p142='?' (DbType = Boolean), @p143='?' (DbType = Int32), @p144='?' (DbType = Int32), @p145='?' (DbType = Int32), @p146='?' (DbType = Int32), @p147='?' (DbType = Int32), @p148='?' (DbType = Int32), @p149='?' (DbType = Int32), @p150='?' (DbType = Boolean), @p151='?' (DbType = Int32), @p152='?' (DbType = Int32), @p153='?' (DbType = Int32), @p154='?' (DbType = Int32), @p155='?' (DbType = Int32), @p156='?' (DbType = Int32), @p157='?' (DbType = Int32), @p158='?' (DbType = Boolean), @p159='?' (DbType = Int32), @p160='?' (DbType = Int32), @p161='?' (DbType = Int32), @p162='?' (DbType = Int32), @p163='?' (DbType = Int32), @p164='?' (DbType = Int32), @p165='?' (DbType = Int32), @p166='?' (DbType = Boolean), @p167='?' (DbType = Int32), @p168='?' (DbType = Int32), @p169='?' (DbType = Int32), @p170='?' (DbType = Int32), @p171='?' (DbType = Int32), @p172='?' (DbType = Int32), @p173='?' (DbType = Int32), @p174='?' (DbType = Boolean), @p175='?' (DbType = Int32), @p176='?' (DbType = Int32), @p177='?' (DbType = Int32), @p178='?' (DbType = Int32), @p179='?' (DbType = Int32), @p180='?' (DbType = Int32), @p181='?' (DbType = Int32), @p182='?' (DbType = Boolean), @p183='?' (DbType = Int32), @p184='?' (DbType = Int32), @p185='?' (DbType = Int32), @p186='?' (DbType = Int32), @p187='?' (DbType = Int32), @p188='?' (DbType = Int32), @p189='?' (DbType = Int32), @p190='?' (DbType = Boolean), @p191='?' (DbType = Int32), @p192='?' (DbType = Int32), @p193='?' (DbType = Int32), @p194='?' (DbType = Int32), @p195='?' (DbType = Int32), @p196='?' (DbType = Int32), @p197='?' (DbType = Int32), @p198='?' (DbType = Boolean), @p199='?' (DbType = Int32), @p200='?' (DbType = Int32), @p201='?' (DbType = Int32), @p202='?' (DbType = Int32), @p203='?' (DbType = Int32), @p204='?' (DbType = Int32), @p205='?' (DbType = Int32), @p206='?' (DbType = Boolean), @p207='?' (DbType = Int32), @p208='?' (DbType = Int32), @p209='?' (DbType = Int32), @p210='?' (DbType = Int32), @p211='?' (DbType = Int32), @p212='?' (DbType = Int32), @p213='?' (DbType = Int32), @p214='?' (DbType = Boolean), @p215='?' (DbType = Int32), @p216='?' (DbType = Int32), @p217='?' (DbType = Int32), @p218='?' (DbType = Int32), @p219='?' (DbType = Int32), @p220='?' (DbType = Int32), @p221='?' (DbType = Int32), @p222='?' (DbType = Boolean), @p223='?' (DbType = Int32), @p224='?' (DbType = Int32), @p225='?' (DbType = Int32), @p226='?' (DbType = Int32), @p227='?' (DbType = Int32), @p228='?' (DbType = Int32), @p229='?' (DbType =
Int32), @p230='?' (DbType = Boolean), @p231='?' (DbType = Int32), @p232='?' (DbType = Int32), @p233='?' (DbType = Int32), @p234='?' (DbType = Int32), @p235='?' (DbType = Int32), @p236='?' (DbType = Int32), @p237='?' (DbType = Int32), @p238='?' (DbType = Boolean), @p239='?' (DbType = Int32), @p240='?' (DbType = Int32), @p241='?' (DbType = Int32), @p242='?' (DbType = Int32), @p243='?' (DbType = Int32), @p244='?' (DbType = Int32), @p245='?' (DbType = Int32), @p246='?' (DbType = Boolean), @p247='?' (DbType = Int32), @p248='?' (DbType = Int32), @p249='?' (DbType = Int32), @p250='?' (DbType = Int32), @p251='?' (DbType = Int32), @p252='?' (DbType = Int32), @p253='?' (DbType = Int32), @p254='?' (DbType = Boolean), @p255='?' (DbType = Int32), @p256='?' (DbType = Int32), @p257='?' (DbType = Int32), @p258='?' (DbType = Int32), @p259='?' (DbType = Int32), @p260='?' (DbType = Int32), @p261='?' (DbType = Int32), @p262='?' (DbType = Boolean), @p263='?' (DbType = Int32), @p264='?' (DbType = Int32), @p265='?' (DbType = Int32), @p266='?' (DbType = Int32), @p267='?' (DbType = Int32), @p268='?' (DbType = Int32), @p269='?' (DbType = Int32), @p270='?' (DbType = Boolean), @p271='?' (DbType = Int32), @p272='?' (DbType = Int32), @p273='?' (DbType = Int32), @p274='?' (DbType = Int32), @p275='?' (DbType = Int32), @p276='?' (DbType = Int32), @p277='?' (DbType = Int32), @p278='?' (DbType = Boolean), @p279='?' (DbType = Int32), @p280='?' (DbType = Int32), @p281='?' (DbType = Int32), @p282='?' (DbType = Int32), @p283='?' (DbType = Int32), @p284='?' (DbType = Int32), @p285='?' (DbType = Int32), @p286='?' (DbType = Boolean), @p287='?' (DbType = Int32), @p288='?' (DbType = Int32), @p289='?' (DbType = Int32), @p290='?' (DbType = Int32), @p291='?' (DbType = Int32), @p292='?' (DbType = Int32), @p293='?' (DbType = Int32), @p294='?' (DbType = Boolean), @p295='?' (DbType = Int32), @p296='?' (DbType = Int32), @p297='?' (DbType = Int32), @p298='?' (DbType = Int32), @p299='?' (DbType = Int32), @p300='?' (DbType = Int32), @p301='?' (DbType = Int32), @p302='?' (DbType = Boolean), @p303='?' (DbType = Int32), @p304='?' (DbType = Int32), @p305='?' (DbType = Int32), @p306='?' (DbType = Int32), @p307='?' (DbType = Int32), @p308='?' (DbType = Int32), @p309='?' (DbType = Int32), @p310='?' (DbType = Boolean), @p311='?' (DbType = Int32), @p312='?' (DbType = Int32), @p313='?' (DbType = Int32), @p314='?' (DbType = Int32), @p315='?' (DbType = Int32), @p316='?' (DbType = Int32), @p317='?' (DbType = Int32), @p318='?' (DbType = Boolean), @p319='?' (DbType = Int32), @p320='?' (DbType = Int32), @p321='?' (DbType = Int32), @p322='?' (DbType = Int32), @p323='?' (DbType = Int32), @p324='?' (DbType = Int32), @p325='?' (DbType = Int32), @p326='?' (DbType = Boolean), @p327='?' (DbType = Int32), @p328='?' (DbType = Int32), @p329='?' (DbType = Int32), @p330='?' (DbType = Int32), @p331='?' (DbType = Int32), @p332='?' (DbType = Int32), @p333='?' (DbType = Int32), @p334='?' (DbType = Boolean), @p335='?' (DbType = Int32), @p336='?' (DbType = Int32), @p337='?' (DbType = Int32), @p338='?' (DbType = Int32), @p339='?' (DbType = Int32), @p340='?' (DbType = Int32), @p341='?' (DbType = Int32), @p342='?' (DbType = Boolean), @p343='?' (DbType = Int32), @p344='?' (DbType
= Int32), @p345='?' (DbType = Int32), @p346='?' (DbType = Int32), @p347='?' (DbType = Int32), @p348='?' (DbType = Int32), @p349='?' (DbType = Int32), @p350='?' (DbType = Boolean), @p351='?' (DbType = Int32), @p352='?' (DbType = Int32), @p353='?' (DbType = Int32), @p354='?' (DbType = Int32), @p355='?' (DbType = Int32), @p356='?' (DbType = Int32), @p357='?' (DbType = Int32), @p358='?' (DbType = Boolean),
@p359='?' (DbType = Int32), @p360='?' (DbType = Int32), @p361='?' (DbType = Int32), @p362='?' (DbType = Int32), @p363='?' (DbType = Int32), @p364='?' (DbType = Int32), @p365='?' (DbType = Int32), @p366='?' (DbType = Boolean), @p367='?' (DbType = Int32), @p368='?' (DbType = Int32), @p369='?' (DbType = Int32), @p370='?' (DbType = Int32), @p371='?' (DbType = Int32), @p372='?' (DbType = Int32), @p373='?' (DbType = Int32), @p374='?' (DbType = Boolean), @p375='?' (DbType = Int32), @p376='?' (DbType = Int32), @p377='?' (DbType = Int32), @p378='?' (DbType = Int32), @p379='?' (DbType = Int32), @p380='?' (DbType = Int32), @p381='?' (DbType = Int32), @p382='?' (DbType = Boolean), @p383='?' (DbType = Int32), @p384='?' (DbType = Int32), @p385='?' (DbType = Int32), @p386='?' (DbType = Int32), @p387='?' (DbType = Int32), @p388='?' (DbType = Int32), @p389='?' (DbType = Int32), @p390='?' (DbType = Boolean), @p391='?' (DbType = Int32), @p392='?' (DbType = Int32), @p393='?' (DbType = Int32), @p394='?' (DbType = Int32), @p395='?' (DbType = Int32), @p396='?' (DbType = Int32), @p397='?' (DbType = Int32), @p398='?' (DbType = Boolean), @p399='?' (DbType = Int32), @p400='?' (DbType = Int32), @p401='?' (DbType = Int32), @p402='?' (DbType = Int32), @p403='?' (DbType = Int32), @p404='?' (DbType = Int32), @p405='?' (DbType = Int32), @p406='?' (DbType = Boolean), @p407='?' (DbType = Int32), @p408='?' (DbType = Int32), @p409='?' (DbType = Int32), @p410='?' (DbType = Int32), @p411='?' (DbType = Int32), @p412='?' (DbType = Int32), @p413='?' (DbType = Int32), @p414='?' (DbType = Boolean), @p415='?' (DbType = Int32), @p416='?' (DbType = Int32), @p417='?' (DbType = Int32), @p418='?' (DbType = Int32), @p419='?' (DbType = Int32), @p420='?' (DbType = Int32), @p421='?' (DbType = Int32), @p422='?' (DbType = Boolean), @p423='?' (DbType = Int32), @p424='?' (DbType = Int32), @p425='?' (DbType = Int32), @p426='?' (DbType = Int32), @p427='?' (DbType = Int32), @p428='?' (DbType = Int32), @p429='?' (DbType = Int32), @p430='?' (DbType = Boolean), @p431='?' (DbType = Int32), @p432='?' (DbType = Int32), @p433='?' (DbType = Int32), @p434='?' (DbType = Int32), @p435='?' (DbType = Int32), @p436='?' (DbType = Int32), @p437='?' (DbType = Int32), @p438='?' (DbType = Boolean), @p439='?' (DbType = Int32), @p440='?' (DbType = Int32), @p441='?' (DbType = Int32), @p442='?' (DbType = Int32), @p443='?' (DbType = Int32), @p444='?' (DbType = Int32), @p445='?' (DbType = Int32), @p446='?' (DbType = Boolean), @p447='?' (DbType = Int32), @p448='?' (DbType = Int32), @p449='?' (DbType = Int32), @p450='?' (DbType = Int32), @p451='?' (DbType = Int32), @p452='?' (DbType = Int32), @p453='?' (DbType = Int32), @p454='?' (DbType = Boolean), @p455='?' (DbType = Int32), @p456='?' (DbType = Int32), @p457='?' (DbType = Int32), @p458='?' (DbType = Int32), @p459='?' (DbType
= Int32), @p460='?' (DbType = Int32), @p461='?' (DbType = Int32), @p462='?' (DbType = Boolean), @p463='?' (DbType = Int32), @p464='?' (DbType = Int32), @p465='?' (DbType = Int32), @p466='?' (DbType = Int32), @p467='?' (DbType = Int32), @p468='?' (DbType = Int32), @p469='?' (DbType = Int32), @p470='?' (DbType = Boolean), @p471='?' (DbType = Int32), @p472='?' (DbType = Int32), @p473='?' (DbType = Int32),
@p474='?' (DbType = Int32), @p475='?' (DbType = Int32), @p476='?' (DbType = Int32), @p477='?' (DbType = Int32), @p478='?' (DbType = Boolean), @p479='?' (DbType = Int32), @p480='?' (DbType = Int32), @p481='?' (DbType = Int32), @p482='?' (DbType = Int32), @p483='?' (DbType = Int32), @p484='?' (DbType = Int32), @p485='?' (DbType = Int32), @p486='?' (DbType = Boolean), @p487='?' (DbType = Int32), @p488='?'
(DbType = Int32), @p489='?' (DbType = Int32), @p490='?' (DbType = Int32), @p491='?' (DbType = Int32), @p492='?' (DbType = Int32), @p493='?' (DbType = Int32), @p494='?' (DbType = Boolean), @p495='?' (DbType = Int32), @p496='?' (DbType = Int32), @p497='?' (DbType = Int32), @p498='?' (DbType = Int32), @p499='?' (DbType = Int32), @p500='?' (DbType = Int32), @p501='?' (DbType = Int32), @p502='?' (DbType = Boolean), @p503='?' (DbType = Int32), @p504='?' (DbType = Int32), @p505='?' (DbType = Int32), @p506='?' (DbType = Int32), @p507='?' (DbType = Int32), @p508='?' (DbType = Int32), @p509='?' (DbType = Int32), @p510='?' (DbType = Boolean), @p511='?' (DbType = Int32), @p512='?' (DbType = Int32), @p513='?' (DbType = Int32), @p514='?' (DbType = Int32), @p515='?' (DbType = Int32), @p516='?' (DbType = Int32), @p517='?' (DbType = Int32), @p518='?' (DbType = Boolean), @p519='?' (DbType = Int32), @p520='?' (DbType = Int32), @p521='?' (DbType = Int32), @p522='?' (DbType = Int32), @p523='?' (DbType = Int32), @p524='?' (DbType = Int32), @p525='?' (DbType = Int32), @p526='?' (DbType = Boolean), @p527='?' (DbType = Int32), @p528='?' (DbType = Int32), @p529='?' (DbType = Int32), @p530='?' (DbType = Int32), @p531='?' (DbType = Int32), @p532='?' (DbType = Int32), @p533='?' (DbType = Int32), @p534='?' (DbType = Boolean), @p535='?' (DbType = Int32), @p536='?' (DbType = Int32), @p537='?' (DbType = Int32), @p538='?' (DbType = Int32), @p539='?' (DbType = Int32), @p540='?' (DbType = Int32), @p541='?' (DbType = Int32), @p542='?' (DbType = Boolean), @p543='?' (DbType = Int32), @p544='?' (DbType = Int32), @p545='?' (DbType = Int32), @p546='?' (DbType = Int32), @p547='?' (DbType = Int32), @p548='?' (DbType = Int32), @p549='?' (DbType = Int32), @p550='?' (DbType = Boolean), @p551='?' (DbType = Int32), @p552='?' (DbType = Int32), @p553='?' (DbType = Int32), @p554='?' (DbType = Int32), @p555='?' (DbType = Int32), @p556='?' (DbType = Int32), @p557='?' (DbType = Int32), @p558='?' (DbType = Boolean), @p559='?' (DbType = Int32), @p560='?' (DbType = Int32), @p561='?' (DbType = Int32), @p562='?' (DbType = Int32), @p563='?' (DbType = Int32), @p564='?' (DbType = Int32), @p565='?' (DbType = Int32), @p566='?' (DbType = Boolean), @p567='?' (DbType = Int32), @p568='?' (DbType = Int32), @p569='?' (DbType = Int32), @p570='?' (DbType = Int32), @p571='?' (DbType = Int32), @p572='?' (DbType = Int32), @p573='?' (DbType = Int32), @p574='?' (DbType
= Boolean), @p575='?' (DbType = Int32), @p576='?' (DbType = Int32), @p577='?' (DbType = Int32), @p578='?' (DbType = Int32), @p579='?' (DbType = Int32), @p580='?' (DbType = Int32), @p581='?' (DbType = Int32), @p582='?' (DbType = Boolean), @p583='?' (DbType = Int32), @p584='?' (DbType = Int32), @p585='?' (DbType = Int32), @p586='?' (DbType = Int32), @p587='?' (DbType = Int32), @p588='?' (DbType = Int32),
@p589='?' (DbType = Int32), @p590='?' (DbType = Boolean), @p591='?' (DbType = Int32), @p592='?' (DbType = Int32), @p593='?' (DbType = Int32), @p594='?' (DbType = Int32), @p595='?' (DbType = Int32), @p596='?' (DbType = Int32), @p597='?' (DbType = Int32), @p598='?' (DbType = Boolean), @p599='?' (DbType = Int32), @p600='?' (DbType = Int32), @p601='?' (DbType = Int32), @p602='?' (DbType = Int32), @p603='?'
(DbType = Int32), @p604='?' (DbType = Int32), @p605='?' (DbType = Int32), @p606='?' (DbType = Boolean), @p607='?' (DbType = Int32), @p608='?' (DbType = Int32), @p609='?' (DbType = Int32), @p610='?' (DbType = Int32), @p611='?' (DbType = Int32), @p612='?' (DbType = Int32), @p613='?' (DbType = Int32), @p614='?' (DbType = Boolean), @p615='?' (DbType = Int32), @p616='?' (DbType = Int32), @p617='?' (DbType =
Int32), @p618='?' (DbType = Int32), @p619='?' (DbType = Int32), @p620='?' (DbType = Int32), @p621='?' (DbType = Int32), @p622='?' (DbType = Boolean), @p623='?' (DbType = Int32), @p624='?' (DbType = Int32), @p625='?' (DbType = Int32), @p626='?' (DbType = Int32), @p627='?' (DbType = Int32), @p628='?' (DbType = Int32), @p629='?' (DbType = Int32), @p630='?' (DbType = Boolean), @p631='?' (DbType = Int32), @p632='?' (DbType = Int32), @p633='?' (DbType = Int32), @p634='?' (DbType = Int32), @p635='?' (DbType = Int32), @p636='?' (DbType = Int32), @p637='?' (DbType = Int32), @p638='?' (DbType = Boolean), @p639='?' (DbType = Int32), @p640='?' (DbType = Int32), @p641='?' (DbType = Int32), @p642='?' (DbType = Int32), @p643='?' (DbType = Int32), @p644='?' (DbType = Int32), @p645='?' (DbType = Int32), @p646='?' (DbType = Boolean), @p647='?' (DbType = Int32), @p648='?' (DbType = Int32), @p649='?' (DbType = Int32), @p650='?' (DbType = Int32), @p651='?' (DbType = Int32), @p652='?' (DbType = Int32), @p653='?' (DbType = Int32), @p654='?' (DbType = Boolean), @p655='?' (DbType = Int32), @p656='?' (DbType = Int32), @p657='?' (DbType = Int32), @p658='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      INSERT INTO "Games" ("ContinueGame", "DateCompleted", "DateCreated", "SudokuMatrixId", "SudokuSolutionId", "UserId")
      VALUES (@p5, @p6, @p7, @p8, @p9, @p10)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p27, @p28, @p29, @p30, @p31, @p32, @p33, @p34)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p35, @p36, @p37, @p38, @p39, @p40, @p41, @p42)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p43, @p44, @p45, @p46, @p47, @p48, @p49, @p50)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p51, @p52, @p53, @p54, @p55, @p56, @p57, @p58)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p59, @p60, @p61, @p62, @p63, @p64, @p65, @p66)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p67, @p68, @p69, @p70, @p71, @p72, @p73, @p74)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p75, @p76, @p77, @p78, @p79, @p80, @p81, @p82)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p83, @p84, @p85, @p86, @p87, @p88, @p89, @p90)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p91, @p92, @p93, @p94, @p95, @p96, @p97, @p98)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p99, @p100, @p101, @p102, @p103, @p104, @p105, @p106)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p107, @p108, @p109, @p110, @p111, @p112, @p113, @p114)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p115, @p116, @p117, @p118, @p119, @p120, @p121, @p122)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p123, @p124, @p125, @p126, @p127, @p128, @p129, @p130)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p131, @p132, @p133, @p134, @p135, @p136, @p137, @p138)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p139, @p140, @p141, @p142, @p143, @p144, @p145, @p146)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p147, @p148, @p149, @p150, @p151, @p152, @p153, @p154)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p155, @p156, @p157, @p158, @p159, @p160, @p161, @p162)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p163, @p164, @p165, @p166, @p167, @p168, @p169, @p170)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p171, @p172, @p173, @p174, @p175, @p176, @p177, @p178)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p179, @p180, @p181, @p182, @p183, @p184, @p185, @p186)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p187, @p188, @p189, @p190, @p191, @p192, @p193, @p194)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p195, @p196, @p197, @p198, @p199, @p200, @p201, @p202)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p203, @p204, @p205, @p206, @p207, @p208, @p209, @p210)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p211, @p212, @p213, @p214, @p215, @p216, @p217, @p218)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p219, @p220, @p221, @p222, @p223, @p224, @p225, @p226)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p227, @p228, @p229, @p230, @p231, @p232, @p233, @p234)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p235, @p236, @p237, @p238, @p239, @p240, @p241, @p242)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p243, @p244, @p245, @p246, @p247, @p248, @p249, @p250)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p251, @p252, @p253, @p254, @p255, @p256, @p257, @p258)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p259, @p260, @p261, @p262, @p263, @p264, @p265, @p266)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p267, @p268, @p269, @p270, @p271, @p272, @p273, @p274)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p275, @p276, @p277, @p278, @p279, @p280, @p281, @p282)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p283, @p284, @p285, @p286, @p287, @p288, @p289, @p290)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p291, @p292, @p293, @p294, @p295, @p296, @p297, @p298)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p299, @p300, @p301, @p302, @p303, @p304, @p305, @p306)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p307, @p308, @p309, @p310, @p311, @p312, @p313, @p314)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p315, @p316, @p317, @p318, @p319, @p320, @p321, @p322)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p323, @p324, @p325, @p326, @p327, @p328, @p329, @p330)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p331, @p332, @p333, @p334, @p335, @p336, @p337, @p338)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p339, @p340, @p341, @p342, @p343, @p344, @p345, @p346)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p347, @p348, @p349, @p350, @p351, @p352, @p353, @p354)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p355, @p356, @p357, @p358, @p359, @p360, @p361, @p362)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p363, @p364, @p365, @p366, @p367, @p368, @p369, @p370)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p371, @p372, @p373, @p374, @p375, @p376, @p377, @p378)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p379, @p380, @p381, @p382, @p383, @p384, @p385, @p386)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p387, @p388, @p389, @p390, @p391, @p392, @p393, @p394)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p395, @p396, @p397, @p398, @p399, @p400, @p401, @p402)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p403, @p404, @p405, @p406, @p407, @p408, @p409, @p410)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p411, @p412, @p413, @p414, @p415, @p416, @p417, @p418)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p419, @p420, @p421, @p422, @p423, @p424, @p425, @p426)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p427, @p428, @p429, @p430, @p431, @p432, @p433, @p434)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p435, @p436, @p437, @p438, @p439, @p440, @p441, @p442)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p443, @p444, @p445, @p446, @p447, @p448, @p449, @p450)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p451, @p452, @p453, @p454, @p455, @p456, @p457, @p458)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p459, @p460, @p461, @p462, @p463, @p464, @p465, @p466)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p467, @p468, @p469, @p470, @p471, @p472, @p473, @p474)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p475, @p476, @p477, @p478, @p479, @p480, @p481, @p482)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p483, @p484, @p485, @p486, @p487, @p488, @p489, @p490)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p491, @p492, @p493, @p494, @p495, @p496, @p497, @p498)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p499, @p500, @p501, @p502, @p503, @p504, @p505, @p506)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p507, @p508, @p509, @p510, @p511, @p512, @p513, @p514)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p515, @p516, @p517, @p518, @p519, @p520, @p521, @p522)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p523, @p524, @p525, @p526, @p527, @p528, @p529, @p530)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p531, @p532, @p533, @p534, @p535, @p536, @p537, @p538)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p539, @p540, @p541, @p542, @p543, @p544, @p545, @p546)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p547, @p548, @p549, @p550, @p551, @p552, @p553, @p554)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p555, @p556, @p557, @p558, @p559, @p560, @p561, @p562)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p563, @p564, @p565, @p566, @p567, @p568, @p569, @p570)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p571, @p572, @p573, @p574, @p575, @p576, @p577, @p578)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p579, @p580, @p581, @p582, @p583, @p584, @p585, @p586)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p587, @p588, @p589, @p590, @p591, @p592, @p593, @p594)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p595, @p596, @p597, @p598, @p599, @p600, @p601, @p602)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p603, @p604, @p605, @p606, @p607, @p608, @p609, @p610)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p611, @p612, @p613, @p614, @p615, @p616, @p617, @p618)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p619, @p620, @p621, @p622, @p623, @p624, @p625, @p626)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p627, @p628, @p629, @p630, @p631, @p632, @p633, @p634)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p635, @p636, @p637, @p638, @p639, @p640, @p641, @p642)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p643, @p644, @p645, @p646, @p647, @p648, @p649, @p650)
      RETURNING "Id";
      INSERT INTO "SudokuCells" ("Column", "DisplayValue", "Index", "Obscured", "Region", "Row", "SudokuMatrixId", "Value")
      VALUES (@p651, @p652, @p653, @p654, @p655, @p656, @p657, @p658)
      RETURNING "Id";
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
      Executing ObjectResult, writing value of type 'SudokuCollective.Models.Game'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
      Executed action SudokuCollective.WebApi.Controllers.GamesController.PostGame (SudokuCollective.WebApi) in 1027.4637ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 1283.2051000000001ms 201 application/json; charset=utf-8
Joseph-Anthony-King commented 5 years ago

I'm closing this issue... it wasn't due to a bug but was due to my implementation of pulling the user from the database.