コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = InjectType.GetHashCode();
         hashCode = (hashCode*397) ^ IncludeProperties.GetHashCode();
         hashCode = (hashCode*397) ^ IncludeMethods.GetHashCode();
         return hashCode;
     }
 }
コード例 #2
0
        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());
        }
コード例 #3
0
 /// <summary>
 /// Specifies property to attach to required entity.
 /// </summary>
 /// <param name="property"></param>
 public void IncludeProperty(Expression <Func <T, object> > property)
 {
     IncludeProperties.Add(property);
 }