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

ignore case for IQueryable #15

Open
veezed opened this issue Dec 6, 2016 · 8 comments
Open

ignore case for IQueryable #15

veezed opened this issue Dec 6, 2016 · 8 comments

Comments

@veezed
Copy link

veezed commented Dec 6, 2016

Some databases, such as Postgre is case sensitive.

You could implement case insensitive queries for IQueryable, by using toLower before applying filter clause.
I implemented it on my own branch on 'contains', I could share it here if you want.

There is small example:
image

image

@ninjanye
Copy link
Owner

This is certainly a good new feature. Be good to have it as a configurable option though. e.g.

context.Search(x => x.String1).CaseInsensitive().Contains("TeSt");

I'll can try and look at this in more detail and get something pushed through.

@veezed
Copy link
Author

veezed commented Jan 17, 2017

Yes, I made it in my branch, it just have different name. In my project it's called IgnoreCase()

@ninjanye
Copy link
Owner

That sounds good. Have you implemented it for all comparison methods (e.g. .StartsWith, .Contains, .EndsWith etc?) or just the contains method? If it's all done, feel free to submit a PR.

@veezed
Copy link
Author

veezed commented Jan 17, 2017

Sorry, just Contains

@PatryxCShark
Copy link

Hi! Where is a solution because I cannot find it?
I want to have possibility to decide about case sensitive or case insensitive comparison especially when it comes to Containing.
Thanks in advanced

@veezed
Copy link
Author

veezed commented Jun 26, 2020 via email

@PatryxCShark
Copy link

MS SQL, but sometimes I have IQueryable which is done in memory. If I know is process on memory side, should I do IQueryable.AsEnumerable() and then use SetCulture?

@veezed
Copy link
Author

veezed commented Jul 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants