public Image GetImageById(int id) { Image image = null; if (Logos?.Count() > 0) { image = Logos.FirstOrDefault(x => x.Id == id); } if (image != null) { return(image); } if (Carousels?.Count() > 0) { image = Carousels.FirstOrDefault(x => x.Id == id); } if (image != null) { return(image); } return(image = Groups.Select(group => group.Images.Where(img => img.Id == id))?.FirstOrDefault()?.FirstOrDefault()); }