Exemple #1
0
        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);
        }
Exemple #2
0
 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);
 }
Exemple #4
0
 public static PhoneNumberType Updating(PhoneNumberType pnt, IContext context) => pnt with