public static System.Collections.Generic.List <ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer> ToDtoCustomers(this System.Collections.Generic.IEnumerable <ServiceStack.Translators.Generator.Tests.Support.Model.Customer> from) { if ((from == null)) { return(null); } System.Collections.Generic.List <ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer> to = new System.Collections.Generic.List <ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer>(); for (System.Collections.Generic.IEnumerator <ServiceStack.Translators.Generator.Tests.Support.Model.Customer> iter = from.GetEnumerator(); iter.MoveNext(); ) { ServiceStack.Translators.Generator.Tests.Support.Model.Customer item = iter.Current; to.Add(item.ToDtoCustomer()); } return(to); }
public static ServiceStack.Translators.Generator.Tests.Support.Model.Customer UpdateCustomer(this ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer fromParam, ServiceStack.Translators.Generator.Tests.Support.Model.Customer to) { ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer from = fromParam; to.Id = from.Id; to.Name = from.Name; if ((from.BillingAddress != null)) { to.BillingAddress = from.BillingAddress.ToDomainModelAddress(); } to.PhoneNumbers = from.PhoneNumbers.ToDomainModelPhoneNumbers(); // Skipping property 'model.ModelReadOnly' because 'model.ModelReadOnly' is read-only to.ModelWriteOnly = from.ModelWriteOnly; to.DtoReadOnly = from.DtoReadOnly; // Skipping property 'model.DtoWriteOnly' because 'this.DtoWriteOnly' is write-only return(to); }
public static ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer ToDtoCustomer(this ServiceStack.Translators.Generator.Tests.Support.Model.Customer from) { if ((from == null)) { return(null); } ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer to = new ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer(); to.Id = from.Id; to.Name = from.Name; to.BillingAddress = from.BillingAddress.ToDtoAddress(); to.PhoneNumbers = from.PhoneNumbers.ToDtoPhoneNumbers(); to.ModelReadOnly = from.ModelReadOnly; // Skipping property 'to.ModelWriteOnly' because 'model.ModelWriteOnly' is write-only // Skipping property 'to.DtoReadOnly' because 'to.DtoReadOnly' is read-only to.DtoWriteOnly = from.DtoWriteOnly; return(to); }
public virtual ServiceStack.Translators.Generator.Tests.Support.Model.Customer UpdateCustomer(ServiceStack.Translators.Generator.Tests.Support.Model.Customer model) { ServiceStack.Translators.Generator.Tests.Support.DataContract.Customer from = this; model.Id = from.Id; model.Name = from.Name; if ((from.BillingAddress != null)) { model.BillingAddress = from.BillingAddress.ToAddress(); } model.PhoneNumbers = ServiceStack.Translators.Generator.Tests.Support.DataContract.PhoneNumber.ToPhoneNumbers(this.PhoneNumbers); // Skipping property 'model.ModelReadOnly' because 'model.ModelReadOnly' is read-only model.ModelWriteOnly = from.ModelWriteOnly; model.DtoReadOnly = from.DtoReadOnly; // Skipping property 'model.DtoWriteOnly' because 'this.DtoWriteOnly' is write-only return(model); }