public async Task Delete(ISiteSettings site) { await _eventHandlers.HandleSitePreDelete(site.Id).ConfigureAwait(false); // delete users await _userCommands.DeleteUsersBySite(site.Id, CancellationToken.None); // this also deletes userroles claims logins await _userCommands.DeleteRolesBySite(site.Id, CancellationToken.None); await _commands.DeleteHostsBySite(site.Id, CancellationToken.None); //resultStep = await siteRepo.DeleteFoldersBySite(site.SiteGuid, CancellationToken.None); // the below method deletes a lot of things by siteid including the following tables // Exec mp_Sites_Delete // mp_UserRoles // mp_UserProperties // mp_UserLocation // mp_Users // mp_Roles // mp_SiteHosts // mp_SiteFolders // mp_SiteSettingsEx // mp_Sites await _commands.Delete(site.Id, CancellationToken.None); _cacheHelper.ClearCache("folderList"); }
public async Task Delete(ISiteSettings site) { // delete users //await userCommands.DeleteUsersBySite(site.Id, CancellationToken.None); // this also deletes userroles claims logins //await userCommands.DeleteRolesBySite(site.Id, CancellationToken.None); await commands.DeleteHostsBySite(site.Id, CancellationToken.None); //resultStep = await siteRepo.DeleteFoldersBySite(site.Sitelong, CancellationToken.None); // the below method deletes a lot of things by siteid including the following tables // Exec mp_Sites_Delete // mp_UserRoles // mp_UserProperties // mp_UserLocation // mp_Users // mp_Roles // mp_SiteHosts // mp_SiteFolders // mp_SiteSettingsEx // mp_Sites await commands.Delete(site.Id, CancellationToken.None); cacheHelper.ClearCache("folderList"); }
public async Task Delete(ISiteSettings site) { // we will need a provider model or something similar here to // allow other features and 3rd party features to delete // related data when a site is deleted // TODO: implement // will ProviderModel be available in Core Framework or will we have to use something else // a way to use dependency injection? // delete users await userCommands.DeleteUsersBySite(site.Id, CancellationToken.None); // this also deletes userroles claims logins await userCommands.DeleteRolesBySite(site.Id, CancellationToken.None); await commands.DeleteHostsBySite(site.Id, CancellationToken.None); //resultStep = await siteRepo.DeleteFoldersBySite(site.SiteGuid, CancellationToken.None); // the below method deletes a lot of things by siteid including the following tables // Exec mp_Sites_Delete // mp_UserRoles // mp_UserProperties // mp_UserLocation // mp_Users // mp_Roles // mp_SiteHosts // mp_SiteFolders // mp_SiteSettingsEx // mp_Sites await commands.Delete(site.Id, CancellationToken.None); cacheHelper.ClearCache("folderList"); }
public async Task Delete(ISiteSettings site) { await _eventHandlers.HandleSitePreDelete(site.Id).ConfigureAwait(false); // delete users await _userCommands.DeleteUsersBySite(site.Id, CancellationToken.None); // this also deletes userroles claims logins await _userCommands.DeleteRolesBySite(site.Id, CancellationToken.None); await _commands.DeleteHostsBySite(site.Id, CancellationToken.None); await _commands.Delete(site.Id, CancellationToken.None); await _cacheHelper.ClearSiteFolderListCache(); }