Closed divmgl closed 9 years ago
I have been able to confirm that using this is only occurring when using a dynamic object.
Accounts.Insert(new Account {
Id: 1,
Active: true
});
var account = Accounts.FindBy(Id: 1, Active: true);
// Returns a record
Accounts.Insert(new {
Id: 2,
Active: true
});
var nullAccount = Accounts.FindBy(Id: 2, Active: true);
// Returns null
I have been able to get more information on this problem.
When using an InMemoryAdapter, the FindBy method does not understand different numerical types that are equal in value. For instance, a long type with a value of 0 is not the same as a int type with a value of 0.
Not sure yet if this is good or bad, the issue still persists with dynamic objects.
When using the InMemoryAdapter, executing a FindBy with multiple conditions will not work.
This is leading to some serious problems doing proper TDD. I will investigate to see what could be causing this issue.