Leave calculation in MVC using linq

anil yadav 1 Reputation point
2022-10-04T09:18:22.52+00:00

NoOfDays = Convert.ToInt32((ToDate - FromDate).TotalDays) 2022-10-05
2022-10-05
If I enter same date in todate and fromdate than it gives 0 days
but I wants to count it as 1 day , how it can be possible.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,199 questions
{count} votes