コード例 #1
0
        public async Task <List <Role> > HandleAsync(GetRolesQuery query, CancellationToken cancellationToken = default)
        {
            var db = _roleRepository.Get(new RoleQueryOptions
            {
                IncludeClaims    = query.IncludeClaims,
                IncludeUserRoles = query.IncludeUserRoles,
                AsNoTracking     = query.AsNoTracking,
            });

            return(await _roleRepository.ToListAsync(db));
        }
コード例 #2
0
        public List <Role> Handle(GetRolesQuery query)
        {
            var db = _roleRepository.Get(new RoleQueryOptions
            {
                IncludeClaims    = query.IncludeClaims,
                IncludeUserRoles = query.IncludeUserRoles,
                AsNoTracking     = query.AsNoTracking,
            });

            return(db.ToList());
        }