Skip to content

Filter By Date/Filter data between dates #148

Closed Answered by alirezanet
Mr-Mohammad asked this question in Q&A
Discussion options

You must be logged in to vote

also, I should note these mappings are not required since you're using the same property names.

          .AddMap("FirstName", v => v.FirstName)
            .AddMap("LastName", v => v.LastName)
            .AddMap("NationalCode", v => v.NationalCode)
            .AddMap("PhoneNumber", v => v.PhoneNumber)
            .AddMap("UserName", v => v.UserName)
            .AddMap("IsActive", v => v.IsActive)
            .AddMap("Gender", v => v.Gender)

So you need just this part:

 var mapper = new GridifyMapper<Users>(true)
            .AddMap("CreateDate", v=>v.CreateDate.Date);

 var res = _dbContext.Users.Gridify(query, mapper);

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mr-Mohammad
Comment options

@alirezanet
Comment options

@alirezanet
Comment options

Answer selected by Mr-Mohammad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants