Exemplo n.º 1
0
 //  Create entity from model.
 public PointOfContact(PointOfContactModel model)
 {
     FirstName    = model.FirstName;
     LastName     = model.LastName;
     Title        = model.Title;
     Address      = new SystemAddress(model.Address);
     PhoneNumber  = new SystemPhoneNumber(model.PhoneNumber);
     EmailAddress = new SystemEmailAddress(model.EmailAddress);
 }
 public SystemUser(SystemUserModel model)
 {
     Id              = string.IsNullOrEmpty(model.Id) ? Guid.NewGuid().ToString() : model.Id;
     NamePrefix      = model.NamePrefix;
     NameFirst       = model.NameFirst;
     NameLast        = model.NameLast;
     NameSuffix      = model.NameSuffix;
     DisplayAs       = model.DisplayAs;
     ProfileImageUrl = model.ProfileImageUrl;
     MustChangePasswordAtNextLogin = model.MustChangePasswordAtNextLogin;
     PasswordExpirationDateTime    = model.PasswordExpirationDateTime;
     Enabled              = model.Enabled;
     EmailAddresses       = SystemEmailAddress.Construct(model.EmailAddresses);
     PhoneNumbers         = SystemPhoneNumber.Construct(model.PhoneNumbers);
     Roles                = model.Roles;
     CloneToAdminDatabase = model.CloneToAdminDatabase;
 }