private CompanyGroup.Dto.PartnerModule.Representatives ConvertRepresentatives(CompanyGroup.Domain.PartnerModule.Representatives representative) { CompanyGroup.Dto.PartnerModule.Representatives response = new Dto.PartnerModule.Representatives(); response.Items = representative.ConvertAll(x => ConvertRepresentative(x)); return response; }
/// <summary> /// domain CompletionList -> DTO CompletionList /// </summary> /// <param name="from"></param> /// <returns></returns> public CompanyGroup.Dto.WebshopModule.CompletionList Map(CompanyGroup.Domain.WebshopModule.CompletionList from) { try { return new CompanyGroup.Dto.WebshopModule.CompletionList() { Items = from.ConvertAll<CompanyGroup.Dto.WebshopModule.Completion>(x => MapItem(x)), }; } catch { return new CompanyGroup.Dto.WebshopModule.CompletionList() { Items = new List<Dto.WebshopModule.Completion>() }; } }
/// <summary> /// domain terméklista -> DTO terméklista /// </summary> /// <param name="products"></param> /// <returns></returns> public CompanyGroup.Dto.WebshopModule.Products Map(CompanyGroup.Domain.WebshopModule.Products products) { try { CompanyGroup.Dto.WebshopModule.Products result = new CompanyGroup.Dto.WebshopModule.Products(); result.Items = new List<CompanyGroup.Dto.WebshopModule.Product>(); result.Items.AddRange(products.ConvertAll(x => new ProductToProduct().Map(x))); result.ListCount = products.ListCount; return result; } catch { return new CompanyGroup.Dto.WebshopModule.Products(); } }