| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | |
| | | { |
| | | return !list.IsNull(); |
| | | } |
| | | |
| | | public static IQueryable<TEntity> GetQueryable<TEntity, TDbContextLocator>(this IRepository<TEntity, TDbContextLocator> rep, bool noTracking = true) |
| | | where TEntity : class, IPrivateEntity, new() |
| | | where TDbContextLocator : class, IDbContextLocator |
| | | { |
| | | var q = rep.AsQueryable(); |
| | | if (noTracking) |
| | | { |
| | | q = q.AsNoTracking(); |
| | | } |
| | | return q; |
| | | } |
| | | |
| | | public static IQueryable<TEntity> GetQueryable<TEntity>(this IRepository<TEntity> rep, bool noTracking = true) |
| | | where TEntity : class, IPrivateEntity, new() |
| | | { |
| | | var q = rep.AsQueryable(); |
| | | if (noTracking) |
| | | { |
| | | q = q.AsNoTracking(); |
| | | } |
| | | return q; |
| | | } |
| | | } |
| | | } |