Exemple #1
0
        public async Task <ApiResponse <List <Module> > > GetRolesPermissions(string[] id, Guid tenantId)
        {
            var modules = await HostRepository.GetAsync <Module>(
                m => m.Pages.SelectMany(p => p.Actions).SelectMany(a => a.AppRoleActions)
                .Any(ar => id.Contains(ar.ApplicationRole.Name) && ar.ApplicationRole.TenantId == tenantId),
                includeProperties : "Pages.Actions.AppRoleActions.ApplicationRole");

            return(ApiResponse <List <Module> > .Success(modules.ToList()));
        }