ConfigureJoin
There are 2 ways to configure joins (or the relations) on the InMemoryAdapter; with the ConfigureJoin-method or with the more fluent interface Join.Master().Detail().
These two examples are equivalent
var adapter = new InMemoryAdapter();
// Set up the relation from Users to categories
adapter.ConfigureJoin("Users", "Id", "User", "Categories", "UserId", "Categories");
Database.UseMockAdapter(adapter);
var db = Database.Open();
db.Users.Insert(Id: 1, Name: "Marcus");
db.Users.Insert(Id: 2, Name: "Per");
db.Categories.Insert(Id: 1, UserId: 1, Name: "Category 1");
db.Categories.Insert(Id: 2, UserId: 2, Name: "Category 2");
var categories = db.Users.FindAll(db.User.Categories.Name == "Category 1").ToList();
Assert.NotNull(categories);
Assert.AreEqual(1, categories.Count);
Join.Master().Detail()
The equivalent call to ConfigureJoin above is as follows
var adapter = new InMemoryAdapter();
// Set up the relation from Users to categories
adapter.Join.Master("Users", "Id").Detail("Categories", "UserId");
Database.UseMockAdapter(adapter);
var db = Database.Open();
db.Users.Insert(Id: 1, Name: "Marcus");
db.Users.Insert(Id: 2, Name: "Per");
db.Categories.Insert(Id: 1, UserId: 1, Name: "Category 1");
db.Categories.Insert(Id: 2, UserId: 2, Name: "Category 2");
var categories = db.Users.FindAll(db.User.Categories.Name == "Category 1").ToList();
Assert.NotNull(categories);
Assert.AreEqual(1, categories.Count);