System.Data.SQLite
Artifact Content
Not logged in

Artifact c443a2251f7a42557aa0000e5460d02e5768cc57:

Ticket change [c443a2251f] - New ticket [988e2d6107] EF6 implementation does not work as expected. by anonymous 2019-01-11 21:32:39.
D 2019-01-11T21:32:39.235
J foundin 1.0.109
J icomment Calling\sFind\son\sa\sDBSet\sdoes\snot\sreturn\sresults\sw/o\scalling\sToList()\sfirst.\r\n\r\nExample:\r\n\s\s\s\s\s\s\s\s\s\s\s\susing\s(var\sconnection\s=\snew\sSQLiteConnection("Data\sSource=:memory:"))\r\n\s\s\s\s\s\s\s\s\s\s\s\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sconnection.Open();\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\svar\sid\s=\sGuid.NewGuid();\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\susing\s(var\scontext\s=\snew\sTestDBSQLiteContext(connection))\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\svar\scustomer\s=\snew\sCustomer\s{Id\s=\sid,\sSisNumber\s=\s"1234567"};\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\scontext.Customers.Add(customer);\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\scontext.SaveChanges();\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\susing\s(var\scontext\s=\snew\sTestDBSQLiteContext(connection))\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s//\sthis\sshould\swrite\sthe\ssis\snumber\s(but\sdoes\snot)\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sConsole.WriteLine(context.Customers.Find(id)?.SisNumber\s??\s"<NULL>");\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\susing\s(var\scontext\s=\snew\sTestDBSQLiteContext(connection))\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\svar\sdummy\s=\scontext.Customers.ToList();\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s//\shere\sit\sgets\swritten\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sConsole.WriteLine(context.Customers.Find(id)?.SisNumber\s??\s"<NULL>");\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\r\n\s\s\s\s\s\s\s\s\s\s\s\s}\r\n\r\nI\scan\sprovide\sa\scomplete\stest\sprogram,\sif\srequired.
J login anonymous
J mimetype text/x-fossil-plain
J private_contact d9b0a708747a5af8c834cc35c3a3c87ad7c0f2a6
J severity Important
J status Open
J title EF6\simplementation\sdoes\snot\swork\sas\sexpected
J type Incident
K 988e2d6107c786b9160a7fc0dcd4ecc6167bee50
U anonymous
Z 96f02e64f109bc83625d41849196376d