public IActionResult Add(Agency agency)
        {
            var result = _agencyRepository.Insert(agency);

            if (result.Success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                throw new Exception(result.Messages[0]);
            }
        }
        public IActionResult Add(Agency agency)
        {
            var response = agencyRepo.Insert(agency);

            if (response.Success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(BadRequest(response.Message));
            }
        }