/// <summary> /// Deletes a setting /// </summary> /// <param name="setting">Setting</param> public virtual void DeleteSetting(Setting setting) { if (setting == null) { throw new ArgumentNullException("setting"); } _settingRepository.Delete(setting); //cache _cacheManager.RemoveByPattern(SETTINGS_PATTERN_KEY); }
public ActionResult DeleteConfirmed(long id) { settingRepository.Delete(id); settingRepository.Save(); return(RedirectToAction("Index")); }
public async Task <IActionResult> Delete(int id) { await settingRepository.Delete(id); await unitOfWork.SaveEntitiesAsync(); return(Ok()); }
public async Task <JsonResult> DeleteConfirmed(int id) { { await _settingRepository.Delete(id); return(Json("Excluded Time")); } }
public virtual void Delete(int id) { var setting = _settingRepository.GetById(id); _settingRepository.Delete(setting); _settingRepository.SaveChanges(); _settingRepository.InvalidateCache(); //find a smart way not to load all the settings again }
public void DeleteSetting(SettingKeys key) { var setting = _settingRepository.FindBy(t => t.Key == key.ToString()).FirstOrDefault(); if (setting != null) { _settingRepository.Delete(setting); _settingRepository.Commit(); } }
public ActionResult Delete(int Id) { if (_settingRepository.GetById(Id).IsLocked == true) { TempData["AlertMessage"] = App_GlobalResources.Wording.SettingDeleteError; return(RedirectToAction("Index")); } _settingRepository.Delete(Id); TempData["AlertMessage"] = App_GlobalResources.Wording.DeleteSuccess; return(RedirectToAction("Index")); }
public ActionConfirmation Delete(int id) { var setting = Get(id); if (setting == null) { return(ActionConfirmation.CreateFailure("Setting does not exist")); } try { _settingRepository.Delete(setting.Id); return(ActionConfirmation.CreateSuccess("setting deleted!")); } catch (System.Exception exception) { _eventLogService.AddException(exception.Message, exception.StackTrace, EventCategory.EliminarObjeto.ToString(), exception, "", EventSource.Sistema); var confirmation = ActionConfirmation.CreateFailure("setting not deleted | " + exception); return(confirmation); } }
public void DeleteSetting(Setting setting) { settingRepository.Delete(setting); }
public void DeleteSetting(long id) { settingRepository.Delete(x => x.Id == id); }
public void DeleteSetting(long id) { SettingRepository.Delete(c => c.Id == id); }
public virtual void Delete(SettingInfo settingInfo) { _settingRepository .Delete(s => s.TenantId == settingInfo.TenantId && s.UserId == settingInfo.UserId && s.Name == settingInfo.Name); }
public bool Delete(Setting entity) { _settingRepository.Delete(entity); return(true); }