protected IFetchStrategy <DbSet <T> > InstanciateFetchStrategy(IFetchStrategy <DbSet <T> > strategy) { var thisPaths = FetchStrategy != null ? FetchStrategy.IncludePaths : new List <string>(); var paramPaths = strategy != null ? strategy.IncludePaths : new List <string>(); var includePaths = thisPaths.Union(paramPaths); var newStrategy = new GenericFetchStrategy <T>(); foreach (var includePath in includePaths) { newStrategy.Add(includePath); } return(newStrategy); }
public Specification(Expression <Func <T, bool> > predicate) { Predicate = predicate; FetchStrategy = new GenericFetchStrategy <T>(); }
protected CompositeSpecification(Expression <Func <T, bool> > predicate) { FetchStrategy = new GenericFetchStrategy <T>(); Predicate = predicate; }