I have next table:
MyTable
(
ParentId Integer,
Type Integer,
ProdId String,
Date DateTime,
Status Integer
);
I want to query as next:
var res = from tout in myTable.Where(t1 => t1.Type == 1)
                join tin in myTable.Where(t2 => t2.Type != 1)
        on tout.ParentId equals tin.ParentId
                where tout.ProdId == tin.ProdId && tout.Status > tin.Status
                orderby tout.Date
                select new MyTableStructure
                {
            ...
        };
How to write same as IQueryable using lambda?
 
    