diff --git a/Marco.Pms.Services/Controllers/DashboardController.cs b/Marco.Pms.Services/Controllers/DashboardController.cs index d6b7fc8..4676dd1 100644 --- a/Marco.Pms.Services/Controllers/DashboardController.cs +++ b/Marco.Pms.Services/Controllers/DashboardController.cs @@ -44,7 +44,7 @@ namespace Marco.Pms.Services.Controllers toDate = fromDate.AddDays(negativeDays); if (projectId == 0) { - List tasks = await _context.TaskAllocations.Where(t => t.AssignmentDate <= fromDate && t.AssignmentDate >= toDate && t.TenantId == tenantId).ToListAsync(); + List tasks = await _context.TaskAllocations.Where(t => t.AssignmentDate.Date <= fromDate.Date && t.AssignmentDate.Date >= toDate.Date && t.TenantId == tenantId).ToListAsync(); double flagDays = 0; while (negativeDays < flagDays) @@ -85,7 +85,7 @@ namespace Marco.Pms.Services.Controllers List workItems = await _context.WorkItems.Where(i => idList.Contains(i.WorkAreaId) && i.TenantId == tenantId).ToListAsync(); idList = workItems.Select(i => i.Id).ToList(); - List tasks = await _context.TaskAllocations.Where(t => idList.Contains(t.WorkItemId) && t.AssignmentDate <= fromDate && t.AssignmentDate >= toDate && t.TenantId == tenantId).ToListAsync(); + List tasks = await _context.TaskAllocations.Where(t => idList.Contains(t.WorkItemId) && t.AssignmentDate.Date <= fromDate.Date && t.AssignmentDate.Date >= toDate.Date && t.TenantId == tenantId).ToListAsync(); if(project != null) { double flagDays = 0;