Пример #1
0
        public async Task <IHttpActionResult> GetRoles()
        {
            var result = new GetRolesViewModel();
            var roles  = await RoleManager.Roles.OrderBy(x => x.Id).ToListAsync();

            foreach (var role in roles)
            {
                var roleJson = new RoleSimpleJson();
                _roleCopier.CopyRole(role, roleJson);
                result.Roles.Add(roleJson);
            }

            result.Result = true;

            return(Ok(result));
        }
Пример #2
0
 public void CopyRole(RoleSimpleJson source, IdentityRole target)
 {
     Copy(source, target);
 }
Пример #3
0
 public void CopyRole(IdentityRole source, RoleSimpleJson target)
 {
     Copy(source, target);
 }