示例#1
0
        public IActionResult DeletePartner(int idPartner)
        {
            try
            {
                Socio partner = partnerRepository.GetPartnerById(idPartner);

                if (partner == null)
                {
                    throw new ArgumentNullException(HttpStatusCode.NotFound.ToString(), nameof(partner));
                }

                partnerRepository.DeletePartnet(partner);
                return(Ok());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }