コード例 #1
0
ファイル: ReportDtoMapper.cs プロジェクト: zenit1/beame-lfe
 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()
         }
     });
 }
コード例 #2
0
ファイル: DtoHelper.cs プロジェクト: zenit1/beame-lfe
 public static string Entity2FullName(this vw_WS_StoresLib entity)
 {
     return(CombineFullName(entity.OwnerFirstName, entity.OwnerLastName, entity.OwnerNickname));
 }