Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable AsDynamic to also wrap anonymous objects for mixing with settings #2519

Closed
iJungleboy opened this issue Sep 14, 2021 · 0 comments
Closed
Assignees

Comments

@iJungleboy
Copy link
Contributor

I'm submitting a ...
[x] feature request

...about
[x] Razor templating
[x] APIs like REST

Current behavior

When you want to create a configuration to mix with Settings using the new DynamicStack ATM you need to go the JSON route, which is a bit messy. It would be better to allow a syntax like this:

var data = new {
  Property = 7,
  Another = true,
  Deep = new {
    Title = "Deep Title"
  }
};
var dynData = AsDynamic(data);

Your environment

  • 2sxc version(s): 12.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant