Exemple #1
0
        public static string GetWebsite(this IDataGenerator dataGenerator, string companyName = null, int nullOdds = 0)
        {
            var domainName = dataGenerator.GetDomainName(companyName, nullOdds);

            if (domainName == null)
            {
                return(null);
            }

            return($"www.{domainName}");
        }
Exemple #2
0
        public static string GetEmail(this IDataGenerator dataGenerator, string firstName = null, string lastName = null, string companyName = null, int nullOdds = 0)
        {
            var domainName = dataGenerator.GetDomainName(companyName, nullOdds);

            if (domainName == null)
            {
                return(null);
            }

            var emailName = ($"{LowercaseLettersOnly(firstName)}.{LowercaseLettersOnly(lastName)}".Trim('.').TrimToNull() ?? dataGenerator.GetWord(5, 20));

            return($"{emailName}@{domainName}");
        }