Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Is there an available App sample for an Asp.Net Core 2.0 MVC using Entity framework that has search between 2 dates ability?

What I have tried:

Ive tried to search in google but i cant find an example app.
Posted
Updated 28-May-18 7:26am
Comments
F-ES Sitecore 25-May-18 4:38am    
It's done using a "where" clause. Google "entity framework where clause" or "entity framework date range".
Jose Baleros Jr. 25-May-18 4:44am    
how? can i see a sample code please?
im just new in asp.net core

1 solution

If you are using EntityFramework Core, you can use the following,

When working with nullable DateTime I find that I have to use .Value in certain cases. Try this:

>= reportSearch.MinPaidDate.Value
<= reportSearch.MaxPaidDate.Value


ASP.NET Core MVC with EF Core - Data Model - 5 of 10 | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900