예제 #1
0
        public async Task DeleteAsync_DeletesEntity()
        {
            // Arrange
            var expectedCount = await _context.QueueMembers.CountAsync();

            // Act
            await _queueMemberService.DeleteByIdAsync(1);

            var resultCount = await _context.QueueMembers.CountAsync();

            // Assert
            resultCount.Should().Be(expectedCount - 1);
        }
예제 #2
0
        public async Task <IActionResult> Delete(int id)
        {
            await _queueMemberService.DeleteByIdAsync(id);

            return(Ok());
        }
예제 #3
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _service.DeleteByIdAsync(id);

            return(RedirectToAction(nameof(Index)));
        }