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

MemberNameStrategies. SnakeCase strategy use uppercase attribute has a bug #616

Open
fan410577910 opened this issue Jan 2, 2024 · 1 comment
Labels

Comments

@fan410577910
Copy link

var options = new TemplateOptions();

options.MemberAccessStrategy.MemberNameStrategy = MemberNameStrategies.SnakeCase;
var model = new { ID = 12345 };
var context = new TemplateContext(model,options);

if (new FluidParser().TryParse("{{ id }}", out IFluidTemplate? template, out var error))
{
    Console.WriteLine(template.Render(context));
}

The console has no output

@hishamco
Copy link
Collaborator

hishamco commented Jan 2, 2024

The 'id' is not a snake case, but of course a bug. Could you try 'user_name` for instance

@hishamco hishamco added the bug label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants