public static RolesDto FromApp(IAppEntity app, ApiController controller) { var result = new RolesDto { Items = app.Roles.Values.Select(x => RoleDto.FromRole(x, app, controller)).OrderBy(x => x.Name).ToArray() }; return(result.CreateLinks(controller, app.Name)); }
public static RolesDto FromApp(IAppEntity app, Resources resources) { var result = new RolesDto { Items = app.Roles.All .Select(x => RoleDto.FromRole(x, app)) .Select(x => x.WithLinks(resources)) .OrderBy(x => x.Name) .ToArray() }; return(result.CreateLinks(resources)); }