コード例 #1
0
        public async Task <bool> AddAsync(SubscriberModel subsciber, float height)
        {
            var isExsits = _subscriberRepository.IsEmailExistsAsync(subsciber.email);

            if (isExsits.Result == false)
            {
                await _subscriberRepository.AddAsync(subsciber, height);

                return(true);
            }
            throw new Exception("this email exists, try another");
        }