navigation properties

Jul 1, 2011 at 7:19 PM

Another question. Does SouceDB support any kind of navigation properties (for easy writing linq queres...). IqToolkit supports them so you can define for example property

[Association(Member = "Orders", KeyMembers = "CustomerID", RelatedEntityID = "Orders", RelatedKeyMembers = "CustomerID")]
public IList<Order> Orders 

on some class, to get "related" orders.

Jul 1, 2011 at 7:24 PM

No, sauce does not support nav properties, and I have no intention of adding them.  Nav properties cause problems in environments where the the objects need to be serialized (such as wcf).  However, sauce does support doing joins between objects such as

      var result = from i in dStore.Query<TestItemForeignKeyWithString>()
                   join x in dStore.Query<TestItemPrimaryKey>() on i.FKeyField equals x.ID
                   select new