public IEnumerable <LabResultsReportModel> GetLabResultsReportData(DateTime?startDate, DateTime?endDate) { var defaultStartDate = DateTime.Now.AddDays(-1).Date; var defaultEndDate = DateTime.Now; var result = _lotService.GetLabReport( startDate ?? defaultStartDate, endDate ?? defaultEndDate); return(result.Success ? Mapper.Map <IEnumerable <LabResultsReportModel> >(result.ResultingObject) : new List <LabResultsReportModel>()); }