// 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); }
// Create entity from model. public CustomerEntity(CustomerModel model) { Id = string.IsNullOrEmpty(model.Id) ? Guid.NewGuid().ToString() : model.Id; CanonicalName = model.CanonicalName; DisplayName = model.DisplayName; AdminMoniker = model.AdminMoniker; TenantMonikers = model.TenantMonikers; Address = new SystemAddress(model.Address); PhoneNumber = new SystemPhoneNumber(model.PhoneNumber); Website = new SystemWebsite(model.Website); PointOfContact = new PointOfContact(model.PointOfContact); Enabled = model.Enabled; }
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; }