public void DeleteMadbestillingFromDatabase() { IMadbestillingRepository testrepo = DataTestService.GetInMemoryRepo(); var madbestillings = new Madbestillings() { MenuTekst = "Burger", AntalBestillinger = 1 }; testrepo.Save(madbestillings); testrepo.Delete(testrepo.Get(1).MadbestillingId); Assert.Empty(testrepo.Get()); }
public IActionResult DeleteConfirmed(int id) { madbestillingRepository.Delete(id); return(RedirectToAction(nameof(Index))); }