Beispiel #1
0
        public static List <Models.ProductImage> RemoveReferences(this List <Models.ProductImage> list)
        {
            var newList = new List <Models.ProductImage>();

            list.ForEach(item =>
            {
                var obj = new Models.ProductImage();
                obj     = item.RemoveReference();
                newList.Add(obj);
            });
            return(newList);
        }
Beispiel #2
0
        public static Models.ProductImage RemoveReference(this Models.ProductImage item)
        {
            var obj = new Models.ProductImage();

            if (item != null)
            {
                obj.Id                     = item.Id;
                obj.ProductId              = item.ProductId;
                obj.IsActive               = item.IsActive;
                obj.ImagePath              = item.ImagePath;
                obj.ImagePath150x150       = item.ImagePath150x150;
                obj.ImagePath450x450       = item.ImagePath450x450;
                obj.IsDefault              = item.IsDefault;
                obj.ProductVariantDetailId = item.ProductVariantDetailId;
            }
            return(obj);
        }
Beispiel #3
0
        public static Models.ProductImage RemoveReferences(this Models.ProductImage item)
        {
            var obj = new Models.ProductImage();

            obj = item.RemoveReference();
            if (item.Product != null)
            {
                obj.Product = new Models.Product();
                obj.Product = item.Product.RemoveReference();
            }
            if (item.ProductVariantDetail != null)
            {
                obj.ProductVariantDetail = new Models.ProductVariantDetail();
                obj.ProductVariantDetail = item.ProductVariantDetail.RemoveReference();
            }
            return(obj);
        }