public async Task <IActionResult> Delete(int Id) { ReceiptService service = new ReceiptService(_config, _httpContextAccessor); await service.Delete(Id); var AllReceipts = await service.GetAll(); ViewBag.YourEnums = new Microsoft.AspNetCore.Mvc.Rendering.SelectList(Enum.GetValues(typeof(Currency))); return(View("Index", AllReceipts)); }
public void Delete(int id) { _receiptService.Delete(id); }