I need to use lambda expressions or other way to
specify default query for dlinq entity type.
Code below causes compile error shown in comment.
How to fix ?
Maybe to use [QueryAttribute( "Supplier", "d=>
d.Discriminator==""Domestics"" ")] ?
Andrus.
using System;
using System.Linq;
// '<' unexpected : attributes cannot be generic
[QueryAttribute<Supplier>(d=d.Discriminator=="Domes tics")]
class DomesticsSupplier {
public string Discriminator { get; set; };
public string Name { get; set; };
}
class QueryAttribute<TEntity: Attribute {
IQueryable<TEntityQuery;
internal QueryAttribute(IQueryable<TEntityquery) {
Query = query;
}
}