Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(long id)
        {
            themeRepository.Delete(id);
            themeRepository.Save();

            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public IActionResult DeleteTheme(int id)
        {
            Theme theme = _themeRepository.GetTheme(id);

            if (theme == null)
            {
                return(NotFound());
            }
            _themeRepository.Delete(theme);
            _themeRepository.SaveChanges();
            return(NoContent());
        }
Exemplo n.º 3
0
        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)));
        }
Exemplo n.º 4
0
 public void DeleteTheme(ThemeEntity theme)
 {
     themeRepository.Delete(theme.ToDalTheme());
     uow.Commit();
 }
 public void Delete(long key)
 {
     _IRepository.Delete(key);
 }
Exemplo n.º 6
0
 public async Task Delete(int themeId)
 => await themeRepository.Delete(themeId);
Exemplo n.º 7
0
 /// <summary>
 /// Removes a theme
 /// </summary>
 /// <param name="entity">Theme</param>
 public void Delete(BllTheme entity)
 {
     themeRepository.Delete(entity.ToDalTheme());
     unitOfWork.Commit();
 }