コード例 #1
0
        public Messages DeleteBenefit(int Id)
        {
            var target = _benefitRepository.Get(Id);

            if (target == null)
            {
                return(Messages.NotFound);
            }

            if (target.Active == 1)
            {
                return(Messages.AccessDenied);
            }

            _benefitRepository.Delete(Id);

            return(Messages.Success);
        }