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

Support automatic mapping generation for list of primitives #168

Open
alirezanet opened this issue May 16, 2024 · 0 comments
Open

Support automatic mapping generation for list of primitives #168

alirezanet opened this issue May 16, 2024 · 0 comments
Labels
feature-request Request for a new feature

Comments

@alirezanet
Copy link
Owner

alirezanet commented May 16, 2024

Details

This example should work without creating a custom mapper.

  • should work for both List<string> or primitives
var dataSource = new List<Artist>() { new() {FavouriteColors = ["Green", "Blue"]}}.AsQueryable();

var mapper = new GridifyMapper<Artist>()
		.AddMap("fc", w=> w.FavouriteColors.Select(fc => fc));


var query = dataSource.ApplyFiltering("fc=Red|fc=Blue", mapper);

var lst = query.ToList().Dump();

class Artist
{
	public string[] FavouriteColors { get; set; }
}
@alirezanet alirezanet added enhancement New feature or request feature-request Request for a new feature and removed enhancement New feature or request labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant