I need to build two methods on my system, which do the following:
1) Write a% c and% in C #, a range of dates. For this I have a function that I use in the SQLServer here of the company, which returns me an integer of working days. The architecture pattern is already set this way, so I have to do it this way;
The function of SQLServer , I consume as follows:
using (IDbConnection dbConnection = Connection)
{
string sQuery = "select dbo.working_days(@dtUtil) as QuantidadeDiasUteis";
dbConnection.Open();
return dbConnection.Query<DiasUteis>(sQuery, new { dtUtil =
Convert.ToDateTime(DtDiaUtil) }).FirstOrDefault();
}
Note: My input parameter is a future date, and it returns me the number of workdays in an integer.
2) After storing the dates in dictionary<T>
, I need to read, check the dates.
Then it would look something like this:
31/07/2018 = 1;
01/08/2018 = 3;
06/08/2018 = 4; ==> (Ignorou os Sábados e Domingos);
I need to return this information!