Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/08/18 11:13:15 (7 years ago)
Author:
jzenisek
Message:

#2839

  • updated sql scripts (necessary foreign key option alterations & introduction of statistic tables)
  • updated HiveService according to changed client side (deletion-routine, permission checking,...)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ResourceDao.cs

    r15577 r15737  
    3535    public Resource GetByName(string name) {
    3636      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      }
    3745    }
    3846
     
    8997
    9098    #region String queries
     99    private const string DeleteByIdsQueryString = @"
     100      DELETE FROM [Resource]
     101      WHERE ResourceId IN ({0})
     102    ";
    91103    private const string CountExistenceQuery = @"
    92104      SELECT COUNT(DISTINCT r.ResourceId)
Note: See TracChangeset for help on using the changeset viewer.