Esempio n. 1
0
        public List <FeatureImageDTO> addFeaturedImage(FeatureImageDTO f)
        {
            using (var db = new GG.Models.GGModelContainer())
            {
                FeatureImage FeatureImageTbl = new FeatureImage();

                FeatureImageDTO newFeatureImage = new FeatureImageDTO();

                FeatureImageTbl = new FeatureImage
                {
                    Url = f.url
                };

                db.FeatureImages.Add(FeatureImageTbl);

                db.SaveChanges();



                var l = (from x in db.FeatureImages
                         .Select(b => new FeatureImageDTO
                {
                    id = b.Id,
                    url = b.Url
                })

                         select x).ToList();


                return(l);
            }
        }
Esempio n. 2
0
 public FeatureImage SaveAsImage()
 {
     if (saveAsImage == null)
     {
         saveAsImage = new FeatureImage();
     }
     return(saveAsImage);
 }
Esempio n. 3
0
 public FeatureImage SaveAsImage()
 {
     if (saveAsImage == null)
         saveAsImage = new FeatureImage();
     return saveAsImage;
 }
Esempio n. 4
0
        public bool Equals(TrendingEntry input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Weight == input.Weight ||
                     (Weight.Equals(input.Weight))
                     ) &&
                 (
                     IsFeatured == input.IsFeatured ||
                     (IsFeatured != null && IsFeatured.Equals(input.IsFeatured))
                 ) &&
                 (
                     Identifier == input.Identifier ||
                     (Identifier != null && Identifier.Equals(input.Identifier))
                 ) &&
                 (
                     EntityType == input.EntityType ||
                     (EntityType != null && EntityType.Equals(input.EntityType))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     Tagline == input.Tagline ||
                     (Tagline != null && Tagline.Equals(input.Tagline))
                 ) &&
                 (
                     Image == input.Image ||
                     (Image != null && Image.Equals(input.Image))
                 ) &&
                 (
                     StartDate == input.StartDate ||
                     (StartDate != null && StartDate.Equals(input.StartDate))
                 ) &&
                 (
                     EndDate == input.EndDate ||
                     (EndDate != null && EndDate.Equals(input.EndDate))
                 ) &&
                 (
                     Link == input.Link ||
                     (Link != null && Link.Equals(input.Link))
                 ) &&
                 (
                     WebmVideo == input.WebmVideo ||
                     (WebmVideo != null && WebmVideo.Equals(input.WebmVideo))
                 ) &&
                 (
                     Mp4Video == input.Mp4Video ||
                     (Mp4Video != null && Mp4Video.Equals(input.Mp4Video))
                 ) &&
                 (
                     FeatureImage == input.FeatureImage ||
                     (FeatureImage != null && FeatureImage.Equals(input.FeatureImage))
                 ) &&
                 (
                     Items == input.Items ||
                     (Items != null && Items.SequenceEqual(input.Items))
                 ) &&
                 (
                     CreationDate == input.CreationDate ||
                     (CreationDate != null && CreationDate.Equals(input.CreationDate))
                 ));
        }