示例#1
0
        public Image GetImageWithThumbnailsAndGallery(int idImage)
        {
            var builder = new BuilderImage(DbSet);

            builder.Id(idImage);
            builder.IncludeGallery();
            builder.IncludeThumbnails();

            return(builder.Query.FirstOrDefault());
        }
示例#2
0
        public List <Image> GetParentImagesByGallery(int idGallery, bool?visible = null)
        {
            var builder = new BuilderImage(DbSet);

            if (visible.HasValue)
            {
                builder.IsVisible(visible.Value);
            }

            builder.InGallery(idGallery);
            builder.IsParent();
            builder.IncludeThumbnails();

            return(builder.ToList());
        }