none
Abstract query RRS feed

  • Question

  • I'm working on a framework but I ran in a lot of trouble because the abstraction of DynamicQuery.

    I'm trying to make this query abstract:

    from e in query where e.date==(from i in query where e.id == i.id select i.date).Max() select e;

    The only what I have is a context and tentity type.

    Maybe a solution is that I can extend tentity with an interface with the date and id fields. But that doesn't compile & would propably not work because of the self generated fields without a binding.

     

        public abstract class AbstractBusinessObject<TEntity,TContext>
            where TEntity : class, new()
               where TContext: DataContext, new()

    In my opionion there is also no way to do this with the DynamicQuery code from Microsoft because I couln't make the relation between the two tables (e.id==i.id).

    Monday, May 24, 2010 1:49 PM

Answers