public async Task DestroyTest() { var fakeRepository = Mock.Of <ICountriesRepository>(); var countriesService = new CountriesService(fakeRepository); var country = new Country() { Id = 1, Name = "DestroyedCountry" }; await countriesService.Destroy(country.Id); }
public async Task <IActionResult> DeleteConfirmed(uint id) { await _service.Destroy(id); return(RedirectToAction(nameof(Index))); }