public void SavePhoneType()
        {
            this.WrapTest(() =>
            {
                var phoneType = new PhoneType();
                phoneType.Name = "Celular";

                this.userDomainService.SavePhoneType(phoneType);

                factory.Get<IUnitOfWork>().Commit();
            });
        }
 public void SavePhoneType(PhoneType phoneType)
 {
     Check.IsNull(phoneType, "phoneType");
     if(phoneType.Id == 0)
     {
         this.repository.Insert(phoneType);
     }
     else
     {
         this.repository.Update(phoneType);
     }
 }
Esempio n. 3
0
 public void SavePhoneType(PhoneType phoneType)
 {
     Check.IsNull(phoneType, "phoneType");
     if (phoneType.Id == 0)
     {
         this.repository.Insert(phoneType);
     }
     else
     {
         this.repository.Update(phoneType);
     }
 }