public async Task CanSoftDeleteQuestion() { // Arrange: var toDelete = await _sut.Get().FirstOrDefaultAsync(x => !x.Deleted); // Act: var result = await _sut.DeleteSoftAsync(toDelete.Id); // Assert: var deleted = await _sut.Get().FirstOrDefaultAsync(x => x.Id == toDelete.Id); Assert.True(deleted.Deleted); Assert.Equal(1, result); }
public async Task <int> DeleteSoftAsync(int id) { return(await _dal.DeleteSoftAsync(id)); }