-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Made SearchOptionsProcessor and SortOptionsProcessor static classes #19
Conversation
if (terms.Any()) | ||
if (!terms.Any()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JudeVajira , I checked my master
branch and line 80 is already having a negate operator. if (!terms.Any())
How did your commit has if (terms.Any())
?
var declaredTerms = GetTermsFromModel(typeof(TModel)); | ||
var declaredTerms = GetTermsFromModel(typeof(TModel)).ToList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why a .ToList()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the below line of code at line 58 checks through the Enumerable each time I thought it would be best if it was using a List instead.
var declaredTerm = declaredTerms.SingleOrDefault(x => x.Name.Equals(term.Name, StringComparison.OrdinalIgnoreCase));
if (terms.Length == 0) | ||
if (terms.Any()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again !
is missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix!
I appear to have done a few mistakes. I'll redo my changes and make a new pull request. sorry for the inconvenience. |
Make sure you take latest master which now supports asp.net core 3.0. Thanks |
I have made an updated pull request and suggestion regarding the usage of ASP.NET Core 3.0 |
Made SearchOptionsProcessor and SortOptionsProcessor static classes as there is no need to create an instance of them