Example #1
0
 public async Task <IActionResult> AddSeStockMonthRevenue(string startDate, string endDate)
 {
     try
     {
         List <string> errorYearMonth = new List <string>();
         var           dateList       = Extensions.GetBetweenYearMonths(startDate, endDate);
         foreach (var date in dateList)
         {
             errorYearMonth.Add(await _stockService.AddSeStockMonthRevenue(date));
         }
         return(Ok(errorYearMonth));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, $"Internal server error: {ex}."));
     }
 }