public static StoreReportDTO StoreViewEntity2StoreReportDto(this vw_WS_StoresLib entity) { return(new StoreReportDTO { StoreId = entity.StoreID , TrackingID = entity.TrackingID , Name = entity.StoreName , TotalOwnedItems = entity.OwnedItems , TotalAffiliateItems = entity.AffiliateItems , TotalItems = entity.OwnedItems + entity.AffiliateItems , IsOwnerAdmin = entity.IsOwnerAdmin ?? false , IsAffiliate = entity.AffiliateItems > 0 , RegistrationSource = entity.RegistrationSourceId != null?Utils.ParseEnum <CommonEnums.eRegistrationSources>(entity.RegistrationSourceId.ToString()) : CommonEnums.eRegistrationSources.Unknown , SiteUrl = entity.SiteUrl ?? entity.WixSiteUrl , AddOn = entity.AddOn , Owner = new BaseUserInfoDTO { Email = entity.OwnerEmail , UserId = entity.OwnerUserID , FullName = entity.Entity2FullName() } }); }
public static string Entity2FullName(this vw_WS_StoresLib entity) { return(CombineFullName(entity.OwnerFirstName, entity.OwnerLastName, entity.OwnerNickname)); }