Eager loadoing with SharpRepository?

34 views
Skip to first unread message

symp...@gmail.com

unread,
Feb 2, 2017, 3:46:35 AM2/2/17
to SharpRepository
How do I do eager loading?
I can't find an Include() method in IRepository?
Best regards,
JN.

Omar Piani

unread,
Nov 2, 2017, 5:37:43 AM11/2/17
to SharpRepository
var elems = repo.GetAll("ChildProperty");


var elems = repo.GetAll(pagingOptions, "ChildProperty");



var elems = repo.GetAll(x => x.ChildProperty);



var elems = repo.GetAll(pagingOptions, x => x.ChildProperty);


//using strategy

var strategy = new GenericFetchStrategy<Elements>();
strategy
.Include(x => x.ChildProperty);
var widgets = repo.GetAll(strategy);


var widgets = repo.GetAll(pagingOptions, strategy);


//using specs
var specs = new Specification<Elements>();
specs
.FetchStrategy.Include(x => x.ChildProperty);


var widgets = repo.FindAll(specs);



var widgets = repo.FindAll(specs, pagingOptions);




Sorry, missed this. I suggest to use GitHub issues
Reply all
Reply to author
Forward
0 new messages