public void Delete(string id) { var reviewData = _store.Items <Review>().Where(data => data.MovieId == id) .ToList(); foreach (var item in reviewData) { _store.Delete(item.Id); } }
public void UnignoreRedirect(string oldUrl, int siteId) { // Get hold of the datastore DynamicDataStore store = DataStoreFactory.GetStore(typeof(CustomRedirect)); //find object with matching property "OldUrl" var urlEncode = HttpUtility.UrlEncode(oldUrl); if (urlEncode != null) { var savedUrl = urlEncode.ToLower().Replace("%2f", "/"); var filters = new Dictionary <string, object> { { OldUrlPropertyName, savedUrl.ToLower() }, { SiteIdPropertyName, siteId } }; CustomRedirect match = store.Find <CustomRedirect>(filters).SingleOrDefault(); if (match != null) { // log request to database - if logging is turned on. if (Configuration.Configuration.Logging == LoggerMode.On) { store.Delete(match); // Safe logging RequestLogger.Instance.LogRequest(savedUrl, string.Empty, siteId); } } } }
public static void RemovePersistedValuesFor(this DynamicDataStore store, string pluginId) { var existingBags = store.FindAsPropertyBag("PluginId", pluginId); foreach (var existingBag in existingBags) { store.Delete(existingBag); } }
public void Delete(ISyncKeyMap syncKeyMap) { var ddsSyncKeyMap = syncKeyMap as DdsSyncKeyMap; if (ddsSyncKeyMap != null) { _store.Delete(ddsSyncKeyMap.Id); } }
/// <summary> /// Delete all CustomRedirect objects /// </summary> public void DeleteAllCustomRedirects() { // In order to avoid a database timeout, we delete the items one by one. DynamicDataStore store = DataStoreFactory.GetStore(typeof(CustomRedirect)); foreach (CustomRedirect redirect in GetCustomRedirects(false)) { store.Delete(redirect); } }
internal static void RemoveProcessedQueueItems(System.Collections.ObjectModel.Collection <Identity> ids) { using (DynamicDataStore dynamicDataStore = SearchSettings.GetDynamicDataStore()) { foreach (Identity current in ids) { dynamicDataStore.Delete(current); } } }
public int DeleteAllIgnoredRedirects() { // In order to avoid a database timeout, we delete the items one by one. DynamicDataStore store = DataStoreFactory.GetStore(typeof(CustomRedirect)); var ignoredRedirects = GetIgnoredRedirect(); foreach (CustomRedirect redirect in ignoredRedirects) { store.Delete(redirect); } return(ignoredRedirects.Count()); }
/// <summary> /// Delete CustomObject object from Data Store that has given "OldUrl" property /// </summary> /// <param name="currentCustomRedirect"></param> public void DeleteCustomRedirect(string oldUrl) { // Get hold of the datastore DynamicDataStore store = DataStoreFactory.GetStore(typeof(CustomRedirect)); //find object with matching property "OldUrl" CustomRedirect match = store.Find <CustomRedirect>(OLD_URL_PROPERTY_NAME, oldUrl.ToLower()).SingleOrDefault(); if (match != null) { store.Delete(match); } }
public void Delete(int id) { var item = _store.Items <Rate>().FirstOrDefault(x => x.Id.StoreId == id); if (item != null) { try { _store.Delete(item.Id); } catch (Exception e) { Log.Error(e.Message); } } }
/// <summary> /// Delete CustomObject object from Data Store that has given "OldUrl" property /// </summary> /// <param name="oldUrl"></param> /// <param name="siteId"></param> public void DeleteCustomRedirect(string oldUrl, int siteId) { // Get hold of the datastore DynamicDataStore store = DataStoreFactory.GetStore(typeof(CustomRedirect)); //find object with matching property "OldUrl" var urlEncode = HttpUtility.UrlEncode(oldUrl); if (urlEncode != null) { var savedUrl = urlEncode.ToLower().Replace("%2f", "/"); var filters = new Dictionary <string, object> { { OldUrlPropertyName, savedUrl.ToLower() }, { SiteIdPropertyName, siteId } }; CustomRedirect match = store.Find <CustomRedirect>(filters).SingleOrDefault(); if (match != null) { store.Delete(match); } } }
public void Remove(Identity identity) { _store.Delete(identity); }
public void Delete(ISyncState syncState) { var ddsSyncState = syncState as DdsSyncState; _store.Delete(ddsSyncState.Id); }
public void Delete(Guid commentId) { _commentStore.Delete(commentId); }