Custom Attributes with Lambda Expressions
Here is a hypothetical example of its application in DLINQ.
[Table] private EntitySet<Order> _ActiveOrders; #region hypothetical - does not work
public class Customer
{
[Column]
public string FirstName;
/// The active orders for this customer.
[Association(
Storage=Customer._Orders,
Bind=((c,o) => c.CustomerID==o.CustomerID
&& o.Status==OrderStatus.Active))]
public EntitySet<Order> ActiveOrders;
#endregion
}
In this example,OtherKey is unnecessary. Also, I pretend that theStorage property can be specified literally, but that's another subject.
A concern of mine with such an expression is that it is difficult to parameterize. Presumably DLINQ would fail if a property was referenced that was not mapped to a column.

