I get an error when trying to execute:
Nullable<Guid> ng = corpid; var qry1 = from c in entities.Transactions join p in entities.Products on c.CorporationId equals (Nullable<Guid>) p.CorporationId where c.Branch == br && c.AccountNumber == accountnumber && c.CorporationId == ng orderby c.TransactionDate descending select new { Date = c.TransactionDate, RefNo = c.ReferenceNumber, DlvryAcct = c.DeliveryAccount, Desc = p.Description, GasQty = c.GasQuantity, Total = c.Amount, Balance = c.Balance };
This post is:
LINQ to Entities does not recognize the method
'System.Linq.IQueryable`1 [f__AnonymousType1`7 [System.Nullable`1 [System.DateTime],
System.String, System.String, System.String, System.Nullable`1 [System.Decimal],
System.Nullable`1 [System.Decimal], System.Nullable`1 [System.Decimal]]]
Reverse [f__AnonymousType1`7] (System.Linq.IQueryable`1 [f__AnonymousType1`7 [System.Nullable`1 [System.DateTime],
System.String, System.String, System.String, System.Nullable`1 [System.Decimal],
System.Nullable`1 [System.Decimal], System.Nullable`1 [System.Decimal]]]) '
method, and this method cannot be translated into a store expression.
I do not think the cast to nullable guid command works here. c.CorporationId is the null value of guid, but p.corporationid is just a guide.
Any suggestions?
Erocm source share