Overview
Artifact ID: | c443a2251f7a42557aa0000e5460d02e5768cc57 |
---|---|
Ticket: | 988e2d6107c786b9160a7fc0dcd4ecc6167bee50
EF6 implementation does not work as expected |
User & Date: | anonymous 2019-01-11 21:32:39 |
Changes
- foundin changed to: "1.0.109"
- icomment:
Calling Find on a DBSet does not return results w/o calling ToList() first. Example: using (var connection = new SQLiteConnection("Data Source=:memory:")) { connection.Open(); var id = Guid.NewGuid(); using (var context = new TestDBSQLiteContext(connection)) { var customer = new Customer {Id = id, SisNumber = "1234567"}; context.Customers.Add(customer); context.SaveChanges(); } using (var context = new TestDBSQLiteContext(connection)) { // this should write the sis number (but does not) Console.WriteLine(context.Customers.Find(id)?.SisNumber ?? "<NULL>"); } using (var context = new TestDBSQLiteContext(connection)) { var dummy = context.Customers.ToList(); // here it gets written Console.WriteLine(context.Customers.Find(id)?.SisNumber ?? "<NULL>"); } } I can provide a complete test program, if required.
- login: "anonymous"
- mimetype: "text/x-fossil-plain"
- private_contact changed to: "d9b0a708747a5af8c834cc35c3a3c87ad7c0f2a6"
- severity changed to: "Important"
- status changed to: "Open"
- title changed to: "EF6 implementation does not work as expected"
- type changed to: "Incident"