Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            await _revenueService.DeleteRevenueAsync(id);

            return(RedirectToAction("Index", "Revenues"));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> DeleteRevenueAsync(int id)
        {
            var garage = await _revenueService.GetRevenueByIdAsync(id);

            if (garage == null)
            {
                return(NotFound());
            }

            await _revenueService.DeleteRevenueAsync(garage);

            return(NoContent());
        }