[C#]使用Faker.Net輔助建立假的數據資料
namespace ConsoleApplication11 { class Program { static void Main(string[] args) { for (int i = 0; i < 3; ++i) { ShowFakeUserInfo(); Console.WriteLine(new String(’=’, 50)); } }
static void ShowFakeUserInfo()
{
Console.WriteLine(String.Format("User: {0}", Faker.Name.FullName()));
Console.WriteLine(String.Format("Phone: {0}", Faker.Phone.Number()));
Console.WriteLine(String.Format("Email1: {0}", Faker.Internet.Email()));
Console.WriteLine(String.Format("Email2: {0}", Faker.Internet.FreeEmail()));
Console.WriteLine(String.Format("Company: {0}", Faker.Company.Name()));
Console.WriteLine(String.Format("Country: {0}", Faker.Address.Country()));
}
}
}