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)); }
public void CopyRole(RoleSimpleJson source, IdentityRole target) { Copy(source, target); }
public void CopyRole(IdentityRole source, RoleSimpleJson target) { Copy(source, target); }