public async Task <ActionResult <IEnumerable <MonthlySale> > > GetMonthlySales(DateTime FromDate, DateTime ToDate) { try { var monthlySaleDetails = await Task.FromResult(mobileRepository.GetMobileSaleDetailsData(FromDate, ToDate)); return(Ok(monthlySaleDetails)); } catch (Exception e) { return(BadRequest("Could not fetch test data")); } }