Esempio n. 1
0
        public async Task <IActionResult> DeleteBenefit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var benefit = await _partnerRepository.GetBenefitAsync(id.Value);

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

            var partnerId = await _partnerRepository.DeleteBenefitAsync(benefit);

            return(this.RedirectToAction($"Details/{partnerId}"));
        }