- Timestamp:
- 12/19/17 13:22:47 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedProjectResourceDao.cs
r15540 r15546 37 37 } 38 38 39 public void DeleteByProject AndGrantedUserId(Guid projectId, IEnumerable<Guid> resourceIds) {39 public void DeleteByProjectIdAndResourceIds(Guid projectId, IEnumerable<Guid> resourceIds) { 40 40 string paramIds = string.Join(",", resourceIds.Select(x => string.Format("'{0}'", x))); 41 41 if (!string.IsNullOrWhiteSpace(paramIds)) { 42 string query = string.Format(DeleteByGrantedUserQuery, projectId, paramIds); 42 string query = string.Format(DeleteByProjectIdAndResourceIdsQueryString, projectId, paramIds); 43 DataContext.ExecuteCommand(query); 44 } 45 } 46 47 public void DeleteByProjectIdsAndResourceIds(IEnumerable<Guid> projectIds, IEnumerable<Guid> resourceIds) { 48 string paramProjectIds = string.Join(",", projectIds.Select(x => string.Format("'{0}'", x))); 49 string paramResourceIds = string.Join(",", resourceIds.Select(x => string.Format("'{0}'", x))); 50 if (!string.IsNullOrWhiteSpace(paramResourceIds)) { 51 string query = string.Format(DeleteByProjectIdsAndResourceIdsQueryString, paramProjectIds, paramResourceIds); 43 52 DataContext.ExecuteCommand(query); 44 53 } … … 76 85 77 86 #region String queries 78 private const string DeleteBy GrantedUserQuery=87 private const string DeleteByProjectIdAndResourceIdsQueryString = 79 88 @"DELETE FROM [AssignedProjectResource] 80 89 WHERE ProjectId = '{0}' 81 90 AND ResourceId IN ({1});"; 91 private const string DeleteByProjectIdsAndResourceIdsQueryString = 92 @"DELETE FROM [AssignedProjectResource] 93 WHERE ProjectId IN ({0}) 94 AND ResourceId IN ({1});"; 82 95 private const string CheckProjectGrantedForResourcesQueryString = @" 83 96 WITH rtree AS
Note: See TracChangeset
for help on using the changeset viewer.