D
D
distmemory2020-02-22 18:22:45
ASP.NET
distmemory, 2020-02-22 18:22:45

Where LINQ doesn't work when filtering DateTIme, what's wrong?

if (dto.birthDate != "")
                {
                    DateTime birthDate = Convert.ToDateTime(dto.birthDate);
                    DateTime birthDate1 = Convert.ToDateTime(dto.birthDate).AddDays(1).AddTicks(-1);

                    items = items.Where(e => e.BirthDate >= birthDate && e.BirthDate <= birthDate1);
                }


After items is nullified

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question