MCPcopy Create free account
hub / github.com/FrodeHus/EntraRoleReaper / Get

Method Get

server/Data/Repository.cs:15–31  ·  view source on GitHub ↗
(Expression<Func<TEntity, bool>>? filter = null, Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>>? orderBy = null, string includeProperties = "")

Source from the content-addressed store, hash-verified

13 }
14
15 public virtual async Task<IEnumerable<TEntity>> Get(Expression<Func<TEntity, bool>>? filter = null, Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>>? orderBy = null, string includeProperties = "")
16 {
17 IQueryable<TEntity> query = dbSet;
18 if (filter != null)
19 {
20 query = query.Where(filter);
21 }
22 foreach (var includeProperty in includeProperties.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
23 {
24 query = query.Include(includeProperty);
25 }
26 if (orderBy != null)
27 {
28 return await orderBy(query).ToListAsync();
29 }
30 return await query.ToListAsync();
31 }
32
33 public virtual async Task<TEntity?> GetById(Guid id)
34 {

Callers 3

HandleMethod · 0.45
HandleMethod · 0.45
HandleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected