Example #1
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());
        }
Example #2
0
        public Task <List <Role> > HandleAsync(GetRolesQuery query)
        {
            var db = _roleRepository.Get(new RoleQueryOptions
            {
                IncludeClaims    = query.IncludeClaims,
                IncludeUserRoles = query.IncludeUserRoles,
                AsNoTracking     = query.AsNoTracking,
            });

            return(_roleRepository.ToListAsync(db));
        }