public static List<Promotion> Convert(PromotionContract[] promotions) { List<Promotion> result = new List<Promotion>(); for (int i = 0; i <= promotions.Length - 1; ++i) { result.Add(new Promotion(promotions[i])); } return result; }
public Promotion(PromotionContract promotion) { this.ID = promotion.ID; this.Date = promotion.Date; this.InputDateTime = promotion.InputDateTime; this.Document = promotion.Document; this.IDDocumentInitiator = promotion.IDDocumentInitiator; this.IDPromotionType = promotion.IDPromotionType; this.Description = promotion.Description; }