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

[QUESTION] DateTime Searching problem #61

Open
vukasinpetrovic opened this issue Jun 9, 2021 · 2 comments
Open

[QUESTION] DateTime Searching problem #61

vukasinpetrovic opened this issue Jun 9, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@vukasinpetrovic
Copy link

vukasinpetrovic commented Jun 9, 2021

Describe the question
I implemented SearchableDateTime field on many tables, but it works only on one and I cannot figure out why. In those on which it does not work, sorting works but searching does not in a way that whatever I type in searchbox no results match.

This is a model that works:

public class ApplicationUserDTO
    {
        [Sortable]
        [SearchableString]
        public string Id { get; set; }
        
        [Sortable]
        [SearchableString]
        public string UserName { get; set; }
        
        [Sortable]
        [SearchableString]
        public string Email { get; set; }
        
        [Sortable(EntityProperty = "Profile.Location.Address")]
        [SearchableString(EntityProperty = "Profile.Location.Address")]
        public string Location { get; set; }
        
        [Sortable(EntityProperty = "Profile.Gender")]
        [SearchableEnum(typeof(Gender), EntityProperty = "Profile.Gender")]
        public string Gender { get; set; }
        
        [Sortable(EntityProperty = "Profile.DateOfBirth")]
        [SearchableDateTime(EntityProperty = "Profile.DateOfBirth")]
        public DateTime? DateOfBirth { get; set; }
        
        public bool Active { get; set; }
    }

image
image

This is a model that does not work:

    public class PostReportDTO
    {
        [Sortable]
        [SearchableLong]
        public long Id { get; set; }
        
        [Sortable]
        [SearchableDateTime]
        public DateTime DateTime { get; set; }
        
        [Sortable(EntityProperty = "ReportedBy.UserName")]
        [SearchableString(EntityProperty = "ReportedBy.UserName")]
        public string ReportedBy { get; set; }

        public PostDTO Post { get; set; }
        
        [Sortable]
        [SearchableString]
        public string Explanation { get; set; }
        
        public bool Resolved { get; set; }
    }

image

image
image

Desktop (please complete the following information):
OS: [e.g. iOS] MacOS Big Sur
Browser [e.g. chrome, safari] Chrome
Version [e.g. 22] 91
.NET Core 3.1

@vukasinpetrovic vukasinpetrovic added the question Further information is requested label Jun 9, 2021
@vukasinpetrovic
Copy link
Author

@fingers10 Can you help me with this?

@vukasinpetrovic
Copy link
Author

@fingers10 Any info on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants