0

I've been looking for a good solution to speed up my queries in my application. I came across this link:

https://github.com/MikaelEliasson/EntityFramework.Utilities

Where in example they show how their code works:

var result = db.Contacts
.IncludeEFU(db, c => c.PhoneNumbers)
.ToList();

So basically I pass two parameters into includefu, first is the object of the context I'm using, and then using lambda expression select the child record in the same class...

My structure looks like this:

Class Items
{
//some item data properties
List<Transactions> _transactions {get;set;}
}

And my query looks like this:

var list = ctx.Items.IncludeEfu(ctx,c=>c._transactions).ToList();

But when I use my lambda expression on 2nd parameter I get only these methods:

Equals
GetHashCode
ToString
GetType

What am I doing wrong here, has anyone else worked with EF Utilities before?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
User987
  • 3,663
  • 15
  • 54
  • 115

1 Answers1

1

I'm not sure, if I understand the question correctly, but I think you are just missing some public in your structure.

If so, this might help:

public class Items
{
  //some item data properties
  public List<Transactions> _transactions {get;set;}
}
skymon
  • 850
  • 1
  • 12
  • 19