Пример #1
0
        private static Models.SpinnerPromotion RemoveReference(this Models.SpinnerPromotion item)
        {
            var obj = new Models.SpinnerPromotion();

            if (item != null)
            {
                obj.Id                 = item.Id;
                obj.Image              = item.Image;
                obj.DisplayMessage     = item.DisplayMessage;
                obj.ProductCategoryId  = item.ProductCategoryId;
                obj.CategoryId         = item.CategoryId;
                obj.MoodId             = item.MoodId;
                obj.ActiveTo           = item.ActiveTo;
                obj.ActiveFrom         = item.ActiveFrom;
                obj.DiscountPrice      = item.DiscountPrice;
                obj.DiscountPercentage = item.DiscountPercentage;
                obj.IsActive           = item.IsActive;
                obj.Description        = item.Description;
                obj.ActiveFromTime     = item.ActiveFromTime;
                obj.ActiveToTime       = item.ActiveToTime;
                obj.ProductId          = item.ProductId;
                obj.Filterurl          = item.Filterurl;
                obj.MaxQty             = item.MaxQty;

                obj.Mood = item.Mood;
                obj.SpinnerOptionsPeriod = item.SpinnerOptionsPeriod;
            }
            return(obj);
        }
Пример #2
0
        public static List <Models.SpinnerPromotion> RemoveReferences(this List <Models.SpinnerPromotion> list)
        {
            var newList = new List <Models.SpinnerPromotion>();

            list.ForEach(item =>
            {
                var obj = new Models.SpinnerPromotion();
                obj     = item.RemoveReference();
                newList.Add(obj);
            });
            return(newList);
        }