public ActionResult DeleteConfirmed(long id) { themeRepository.Delete(id); themeRepository.Save(); return(RedirectToAction("Index")); }
public IActionResult DeleteTheme(int id) { Theme theme = _themeRepository.GetTheme(id); if (theme == null) { return(NotFound()); } _themeRepository.Delete(theme); _themeRepository.SaveChanges(); return(NoContent()); }
public async Task <IActionResult> Delete(int id) { var theme = _repository.GetById(id); try { await _repository.Delete(theme); } catch { return(StatusCode(500)); } return(RedirectToAction(nameof(Index))); }
public void DeleteTheme(ThemeEntity theme) { themeRepository.Delete(theme.ToDalTheme()); uow.Commit(); }
public void Delete(long key) { _IRepository.Delete(key); }
public async Task Delete(int themeId) => await themeRepository.Delete(themeId);
/// <summary> /// Removes a theme /// </summary> /// <param name="entity">Theme</param> public void Delete(BllTheme entity) { themeRepository.Delete(entity.ToDalTheme()); unitOfWork.Commit(); }