Changeset 15737 for branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ResourceDao.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/ResourceDao.cs
r15577 r15737 35 35 public Resource GetByName(string name) { 36 36 return GetByNameQuery(DataContext, name); 37 } 38 39 public void DeleteByIds(IEnumerable<Guid> ids) { 40 string paramResourceIds = string.Join(",", ids.ToList().Select(x => string.Format("'{0}'", x))); 41 if (!string.IsNullOrWhiteSpace(paramResourceIds)) { 42 string queryString = string.Format(DeleteByIdsQueryString, paramResourceIds); 43 DataContext.ExecuteCommand(queryString); 44 } 37 45 } 38 46 … … 89 97 90 98 #region String queries 99 private const string DeleteByIdsQueryString = @" 100 DELETE FROM [Resource] 101 WHERE ResourceId IN ({0}) 102 "; 91 103 private const string CountExistenceQuery = @" 92 104 SELECT COUNT(DISTINCT r.ResourceId)
Note: See TracChangeset
for help on using the changeset viewer.