title: Retrieve child entities from CrudAppService in ABP
body: <p>The <code>GetAll</code> and <code>Get</code> methods of the ready-made <code>CrudAppService</code> don't include child entities.</p>
  
  <p>Is it possible to modify its behaviour?</p>
  
  <h1>Update</h1>
  
  <p><code>GetAllIncluding</code> has some problem if the included entity has a navigation property to the parent; it falls into a sort of circular dependency. Is there any <code>Attribute</code> or trick to exclude the navigation property from the serialization? The <code>[NonSerialized]</code> attribute does not seem to be applicable to a navigation property.</p>
  
  <p><strong>PostAppService</strong>:</p>
  
  <pre><code>public class PostAppService : CrudAppService&lt;Post, PostDto&gt;, IPostAppService
  {
      IRepository&lt;Post&gt; _repository = null;
  
      public PostAppService(IRepository&lt;Post&gt; repository) : base(repository)
      {
          _repository = repository;
      }
  
      protected override IQueryable&lt;Post&gt; CreateFilteredQuery(PagedAndSortedResultRequestDto input)
      {
          return _repository.GetAllIncluding(p =&gt; p.Items);
      }
  }
  </code></pre>
  
  <p><strong>PostDto</strong>:</p>
  
  <pre><code>[AutoMap(typeof(Post))]
  public class PostDto : EntityDto
  {
      public ICollection&lt;Item&gt; Items { get; set; }
  }
  </code></pre>
  
  <p><strong>Post</strong> entity:</p>
  
  <pre><code>[Table("AbpPosts")]
  public class Post : FullAuditedEntity&lt;int,User&gt;
  {
      public virtual ICollection&lt;Item&gt; Items { get; set; }
  }
  </code></pre>
  
  <p><strong>Item</strong> entity:</p>
  
  <pre><code>[Table("AbpItems")]
  public class Item : Entity
  {
      [ForeignKey("PostId")]
      public Post Post { get; set; }
      public int PostId { get; set; }
  }
  </code></pre>