Exemplo n.º 1
0
        public async Task DeleteTheme_DeleteItemId1()
        {
            var countItemsImDataBase = await _context.Themes.CountAsync();

            await _service.DeleteAsync(1);

            _context.Themes.CountAsync().Result.Should().Be(countItemsImDataBase - 1);
            _context.Themes.FindAsync(1).Result.Should().BeNull();
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Delete(int themeId)
        {
            await _themeService.DeleteAsync(themeId);

            return(RedirectToAction(nameof(Index)));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> DeleteVerified(int id)
        {
            await _themeService.DeleteAsync(id);

            return(RedirectToAction(nameof(Index)));
        }
Exemplo n.º 4
0
        public async Task <ActionResult> Delete(int themeId)
        {
            await _themeService.DeleteAsync(themeId);

            return(RedirectToAction("Index", "Home", new { area = "" }));
        }