Exemple #1
0
        public async Task <IEnumerable <Role> > Get(RoleGetOptions options)
        {
            var roles = await _dao.Get(options);

            var rolesDepartments = await _roleInDepartmentService.Get(new RoleInDepartmentGetOptions
            {
                RoleIds = roles.Select(o => o.Id).ToList()
            });

            foreach (var role in roles)
            {
                role.RoleDepartments = rolesDepartments.Where(o => o.RoleId == role.Id).ToList();
            }

            return(roles);
        }
        public ActionResult Delete(string id)
        {
            IList <IPerformer> a = _factory.CreateMemberDao().Find(id);

            ViewData["members"] = a;
            return(View(_roleDao.Get(id)));
        }
Exemple #3
0
        public Role Get(int id)
        {
            IdCheck(id);

            return(roleDao.Get(id));
        }