public void CreateNewPhoneNumber(PhoneNumberType type, [RegularExpression(@"[0-9][0-9\s-]+")] string phoneNumber) { var pp = Container.NewTransientInstance <PersonPhone>(); pp.BusinessEntityID = this.BusinessEntityID; pp.Person = this; pp.PhoneNumberType = type; pp.PhoneNumberTypeID = type.PhoneNumberTypeID; pp.PhoneNumber = phoneNumber; Container.Persist(ref pp); this.PhoneNumbers.Add(pp); }
public static (Person, PersonPhone) CreateNewPhoneNumber(this Person p, PhoneNumberType type, [RegEx(@"[0-9][0-9\s-]+")] string phoneNumber) => (p, new PersonPhone()
public void CreateNewPhoneNumber(PhoneNumberType type, [RegularExpression(@"[0-9][0-9\s-]+")]string phoneNumber) { var pp = Container.NewTransientInstance<PersonPhone>(); pp.BusinessEntityID = this.BusinessEntityID; pp.Person = this; pp.PhoneNumberType = type; pp.PhoneNumberTypeID = type.PhoneNumberTypeID; pp.PhoneNumber = phoneNumber; Container.Persist(ref pp); this.PhoneNumbers.Add(pp); }
public static PhoneNumberType Updating(PhoneNumberType pnt, IContext context) => pnt with