public override int GetHashCode() { unchecked { var hashCode = InjectType.GetHashCode(); hashCode = (hashCode*397) ^ IncludeProperties.GetHashCode(); hashCode = (hashCode*397) ^ IncludeMethods.GetHashCode(); return hashCode; } }
private List <TEntity> GetAllIncluding(params Expression <Func <TEntity, object> >[] IncludeProperties) { IQueryable <TEntity> queryable = _entities.AsNoTracking(); return(IncludeProperties.Aggregate(queryable, (current, includeProperty) => current.Include(includeProperty)).ToList()); }
/// <summary> /// Specifies property to attach to required entity. /// </summary> /// <param name="property"></param> public void IncludeProperty(Expression <Func <T, object> > property) { IncludeProperties.Add(property); }