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

Custom search with GUID #2

Closed
hgmauri opened this issue Apr 16, 2021 · 4 comments
Closed

Custom search with GUID #2

hgmauri opened this issue Apr 16, 2021 · 4 comments
Assignees
Labels
bug Something isn't working close fixed good first issue Good for newcomers user-report

Comments

@hgmauri
Copy link

hgmauri commented Apr 16, 2021

Hi

Is there any limitation in using Gridify in Guid property in .Net Core? Because today when I make a query applying the feint informing a Guid correctly, the data is successfully returned to me, but if I inform a "broken" Guid it ignores it and returns all the records:

Example:

http://localhost:5001/api/v1/employee/custom-search?Filter=id==DD0CB126-829F-42FB-B033-F45B2443918E

It works correctly, but if I pass an ID with the broken guid, it is ignored and returns all records, ex:

http://localhost:5001/api/v1/employee/custom-search?Filter=id==DD0CB126-829F-42FB-

@alirezanet alirezanet added bug Something isn't working good first issue Good for newcomers labels Apr 16, 2021
@alirezanet alirezanet self-assigned this Apr 16, 2021
@alirezanet
Copy link
Owner

alirezanet commented Apr 16, 2021

Hello
you are right. what is your expected behavior in this case ? should the library throw an exception or return null (no records)?
what do you prefer?

@hgmauri
Copy link
Author

hgmauri commented Apr 16, 2021

I think that in this case it should always return null or empty, never return all records.

In my view, it should look like this in your code:

             if (queryExpression! = null)
                 query = query.Where(queryExpression);
             else
                 query = query.Take(0);
             return query;

@alirezanet

This comment has been minimized.

alirezanet added a commit that referenced this issue Apr 16, 2021
@alirezanet
Copy link
Owner

alirezanet commented Apr 16, 2021

please try version 1.1.2. I've added GUID handling part to manage most possible scenarios . thank you for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working close fixed good first issue Good for newcomers user-report
Projects
None yet
Development

No branches or pull requests

2 participants