Exemple #1
0
        public static void CreateMembers(IMemberRepository memberRepository)
        {
            if (memberRepository.CollectionExistsAsync().Result)
            {
                return;
            }

            var bogus        = new Faker();
            var bogusMembers = Enumerable.Range(1, 150).Select(i => new Member()
            {
                Address     = bogus.Address.FullAddress(),
                FullName    = bogus.Name.FullName(),
                PhoneNumber = bogus.Phone.PhoneNumber()
            });

            memberRepository.CreateManyAsync(bogusMembers).Wait();
        }