Ejemplo n.º 1
0
        /// <summary>
        /// Create promotion blackout dates
        /// </summary>
        /// <param name="blackoutDates">List of blackout dates to create</param>
        public void CreateBlackoutDates(List<PromotionBlackoutDate> blackoutDates)
        {
            const string tableName = "Pricing.PromotionBlackoutDates";

            var columns = new TableSchemaDao().GetTableColumnNames(tableName);

            DbHelper.ExecuteBulkInsert(tableName, columns, blackoutDates.Select(x =>
                {
                    x.UpdatedByUserId = AuditFieldsHelper.GetUserId();
                    return x;
                }).ToList());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create promotion rate plan links
        /// </summary>
        /// <param name="promotionRatePlanLinks">List of links to create</param>
        public void CreateRatePlanLinks(List<PromotionRatePlanLink> promotionRatePlanLinks)
        {
            const string tableName = "Pricing.PromotionRatePlanLink";

            var columns = new TableSchemaDao().GetTableColumnNames(tableName);

            DbHelper.ExecuteBulkInsert(tableName, columns, promotionRatePlanLinks);
        }