Example #1
0
        public IActionResult BrokerDelete(int id)
        {
            Broker broker = brokerRepo.GetBrokerByID(id);

            if (broker != null)
            {
                brokerRepo.DeleteBroker(broker);
                return(RedirectToAction("Brokers"));
            }
            else
            {
                ModelState.AddModelError("", "Broker Not Found");
            }
            return(RedirectToAction("Home"));
        }