mirror of https://github.com/abpframework/abp.git
2 changed files with 26 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||
using Volo.Blogging.Posts; |
|||
using System.Linq; |
|||
using Microsoft.EntityFrameworkCore; |
|||
|
|||
namespace Volo.Blogging |
|||
{ |
|||
public static class BloggingEntityFrameworkCoreQueryableExtensions |
|||
{ |
|||
public static IQueryable<Post> IncludeDetails(this IQueryable<Post> queryable, bool include = true) |
|||
{ |
|||
if (!include) |
|||
{ |
|||
return queryable; |
|||
} |
|||
|
|||
return queryable |
|||
.Include(x => x.Tags); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue