Changeset 9259
- Timestamp:
- 02/28/13 15:57:50 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r9257 r9259 615 615 public void AssignJobToResource(Guid taskId, IEnumerable<Guid> resourceIds) { 616 616 using (var db = CreateContext()) { 617 var task = db.Tasks.Where(x => x.TaskId == taskId).Single();617 List<AssignedResource> assignedResources = new List<AssignedResource>(); 618 618 foreach (Guid rId in resourceIds) { 619 task.AssignedResources.Add(new AssignedResource() { TaskId = taskId, ResourceId = rId }); 620 } 619 assignedResources.Add(new AssignedResource() { TaskId = taskId, ResourceId = rId }); 620 } 621 db.AssignedResources.InsertAllOnSubmit(assignedResources); 621 622 db.SubmitChanges(); 622 623 }
Note: See TracChangeset
for help on using the changeset viewer.