public Owner ToEntity(MSLivingChoices.Entities.Admin.Enums.OwnerType ownerType) { return(new Owner() { Id = this.Id, Name = this.Name, OwnerType = ownerType, Address = this.Address.ToEntity(), Phones = this.PhoneList.ToEntityList(), Emails = this.EmailList.ToEntity(), Contacts = this.Contacts.ConvertAll <Contact>((ContactVm m) => m.ToEntity()).Where <Contact>((Contact x) => { if (!string.IsNullOrWhiteSpace(x.FirstName)) { return true; } return !string.IsNullOrWhiteSpace(x.LastName); }).ToList <Contact>(), WebsiteUrl = MslcUrlBuilder.NormalizeUri(this.WebsiteUrl), DisplayWebsiteUrl = this.DisplayWebsiteUrl, DisplayName = this.DisplayName, DisplayAddress = this.DisplayAddress, DisplayPhone = this.DisplayPhone, DisplayLogo = this.DisplayLogo, LogoImages = (this.LogoImages != null ? this.LogoImages.ToEntity(ImageType.Logo) : new List <Image>()) }); }
public GetAddressTypesCommand(MSLivingChoices.Entities.Admin.Enums.OwnerType ownerType) : this() { this.OwnerType = new MSLivingChoices.Entities.Admin.Enums.OwnerType?(ownerType); base.CacheKey = CachedBaseCommand <List <KeyValuePair <int, string> > > .GetCacheKey(new string[] { base.StoredProcedureName, this.CommunityType.ToString(), this.OwnerType.ToString(), this.ServiceType.ToString(), this.IdColumnName, this.DescriptionColumnName }); }