Пример #1
0
        public async Task DeleteAsync(int userId, int id)
        {
            var emailAccountToDelete = await _emailAccountRepository.GetByUserIdlAsync(userId, id);

            if (emailAccountToDelete == null)
            {
                throw new Exception("Email account with this id does not exist.");
            }
            await _emailAccountRepository.DeleteAsync(emailAccountToDelete);
        }