Changeset 15737 for branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectDao.cs
- Timestamp:
- 02/08/18 11:13:15 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectDao.cs
r15666 r15737 37 37 public override Project GetById(Guid id) { 38 38 return GetByIdQuery(DataContext, id); 39 } 40 41 public void DeleteByIds(IEnumerable<Guid> ids) { 42 string paramProjectIds = string.Join(",", ids.ToList().Select(x => string.Format("'{0}'", x))); 43 if(!string.IsNullOrWhiteSpace(paramProjectIds)) { 44 string queryString = string.Format(DeleteByIdsQueryString, paramProjectIds); 45 DataContext.ExecuteCommand(queryString); 46 } 39 47 } 40 48 … … 93 101 94 102 #region String queries 103 private const string DeleteByIdsQueryString = @" 104 DELETE FROM [Project] 105 WHERE ProjectId IN ({0}) 106 "; 107 95 108 private const string GetUsageStatsPerProjectQueryString = @" 96 109 SELECT j.ProjectId, SUM(t.CoresNeeded) AS Cores, SUM(t.MemoryNeeded) AS Memory
Note: See TracChangeset
for help on using the changeset viewer.