Ejemplo n.º 1
0
        public ActionResult DeleteConsumer(int id)
        {
            var service = new ConsumerService();

            service.DeleteConsumer(id);

            TempData["Save Result"] = ("The Consumer was removed");
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteConsumer(int id)
        {
            bool success = await _service.DeleteConsumer(id);

            if (success)
            {
                return(Ok());
            }
            else
            {
                return(NotFound());
            }
        }