Example #1
0
        public async Task <int> CreateAgentID()
        {
            bool result;
            int  myRandomNo;

            do
            {
                Random rnd = new Random();
                myRandomNo = rnd.Next(10000000, 99999999);
                result     = await _agentRepository.CheckExistingAgentID(myRandomNo);
            } while (result);

            return(myRandomNo);
        }