- Timestamp:
- 10/07/17 10:21:08 (7 years ago)
- Location:
- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos
- Files:
-
- 1 added
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedTaskResourceDao.cs
r15410 r15411 25 25 26 26 namespace HeuristicLab.Services.Hive.DataAccess.Daos { 27 public class Assigned ResourceDao : GenericDao<Guid, AssignedResource> {28 public Assigned ResourceDao(DataContext dataContext) : base(dataContext) { }27 public class AssignedTaskResourceDao : GenericDao<Guid, AssignedTaskResource> { 28 public AssignedTaskResourceDao(DataContext dataContext) : base(dataContext) { } 29 29 30 public override Assigned Resource GetById(Guid id) {30 public override AssignedTaskResource GetById(Guid id) { 31 31 throw new NotImplementedException(); 32 32 } 33 33 34 public IQueryable<Assigned Resource> GetByTaskId(Guid taskId) {34 public IQueryable<AssignedTaskResource> GetByTaskId(Guid taskId) { 35 35 return Table.Where(x => x.TaskId == taskId); 36 36 } … … 51 51 ) 52 52 SELECT COUNT(ar.TaskId) 53 FROM pr JOIN Assigned Resources ar ON pr.ResourceId = ar.ResourceId53 FROM pr JOIN AssignedTaskResources ar ON pr.ResourceId = ar.ResourceId 54 54 WHERE ar.TaskId = {1} 55 55 "; -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs
r14185 r15411 27 27 namespace HeuristicLab.Services.Hive.DataAccess.Daos { 28 28 public class TaskDao : GenericDao<Guid, Task> { 29 private Table<Assigned Resource> AssignedResourceTable {30 get { return DataContext.GetTable<Assigned Resource>(); }29 private Table<AssignedTaskResource> AssignedTaskResourceTable { 30 get { return DataContext.GetTable<AssignedTaskResource>(); } 31 31 } 32 32 … … 65 65 /// <returns></returns> 66 66 public IEnumerable<Task> GetParentTasks(IEnumerable<Guid> resourceIds, int count, bool finished) { 67 var query = from ar in Assigned ResourceTable67 var query = from ar in AssignedTaskResourceTable 68 68 where resourceIds.Contains(ar.ResourceId) 69 69 && ar.Task.State == TaskState.Waiting … … 106 106 ) 107 107 SELECT DISTINCT t.TaskId, t.JobId, t.Priority 108 FROM pr JOIN Assigned Resources ar ON ar.ResourceId = pr.ResourceId108 FROM pr JOIN AssignedTaskResources ar ON ar.ResourceId = pr.ResourceId 109 109 JOIN Task t ON t.TaskId = ar.TaskId 110 110 WHERE NOT (t.IsParentTask = 1 AND t.FinishWhenChildJobsFinished = 1)
Note: See TracChangeset
for help on using the changeset viewer.