Below...
On Tue, 2009-09-01 at 02:56 -0700, Pankaj Gupta wrote:
> Hi Community,
> Here is piffle problem with the queries using DbLinq.
>
> I issued a query like:
>
> var listOfItem = from item1 in datacontext.ITEM1
> where ( from item2 in datacontext.ITEM2
> where item2.SomeProperty ==
> item1.SomeProperty
> select
> Item2.SomeOtherProperty).contains(SomeDefinedValue)
> select item1;
>
>
> The Compiler error description is:
> An object reference is required to access non-static member
> `<FunctionName>c__AnonStorey2C.MD'(CS0120)]
What compiler is this?
The DbLinq unit tests have a few queries like this, e.g.
// in ReadTest_Subquery.cs
public void CQ5_SubqueryNestedQuery()
{
var db = CreateDB();
var q = from d in db.Orders
where (from r in db.OrderDetails
where r.ProductID == 1
select
r.OrderID).Contains(d.OrderID)
select d;
var count = q.ToList().Count;
Assert.AreEqual(38, count);
}
These compile without error.
Thanks,
- Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---