Closed tcartwright closed 2 years ago
Hello, thank you for creating an issue. You'll need to
Bogus.Person
, orPerson.Populate()
with your desired implmentation.For example, option 2):
void Main()
{
var male = new Person2(Name.Gender.Male);
male.Dump();
}
public class Person2 : Bogus.Person
{
public Person2(Name.Gender gender, string locale = "en") : base(locale)
{
this.Gender = gender;
this.FirstName = this.DsName.FirstName(this.Gender);
this.LastName = this.DsName.LastName(this.Gender);
this.FullName = $"{this.FirstName} {this.LastName}";
this.UserName = this.DsInternet.UserName(this.FirstName, this.LastName);
this.Email = this.DsInternet.Email(this.FirstName, this.LastName);
}
}
Please add a ctor that allows the gender to be specified when creating a new Person like so: Person(string locale, Name.Gender gender).