Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public Specification(Expression <Func <T, bool> > predicate)
 {
     Predicate     = predicate;
     FetchStrategy = new GenericFetchStrategy <T>();
 }
Ejemplo n.º 3
0
 protected CompositeSpecification(Expression <Func <T, bool> > predicate)
 {
     FetchStrategy = new GenericFetchStrategy <T>();
     Predicate     = predicate;
 }