Esempio n. 1
0
        public void DeleteChore(int choreId)
        {
            if (choreId == 0)
            {
                throw new InvalidParameterException("Invalid parameters!");
            }

            if (_currentUserService.MemberType != MemberType.Admin && _currentUserService.MemberType != MemberType.Parent)
            {
                throw new UnauthorizedAccessException();
            }

            _choreService.Delete(choreId);
        }