Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 872027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:43:29+00:00 2026-05-15T10:43:29+00:00

Everything in my Linq query is working properly except for the area where I’m

  • 0

Everything in my Linq query is working properly except for the area where I’m trying to populate a sub-collection with data. (Anything referencing ChannelInfo).

ChannelInfo does appear in Intellisense, so it is recognized as a property of the new OfferType. The right side of my setters for ChannelInfo are also recognized and accessible in intellisense. I really need to create new OfferType objects if possible. Can I reference the sub-connection (ChannelInfo) in such a way that I can get this query to work?

IEnumerable<OfferType> list = (from offerCatType in offerRes.OfferCategory  <=---- OfferCategoryType objects
                               where offerCatType.type == Type
                               from offers in offerCatType.Offer  <=--- OfferType objects
                               where Convert.ToDateTime(offers.startDate) > MonthYear && Convert.ToDateTime(offers.endDate) < MonthYear
                                     select new OfferType
                                     { 
                                         name = offers.name,
                                         description = offers.description, 
                                         startDate = offers.startDate, 
                                         endDate = offers.endDate, 
                                         ChannelInfo.refClickThroughLink = offers.ChannelInfo.refClickThroughLink,
                                         ChannelInfo.refId = offers.ChannelInfo.refId,
                                         ChannelInfo.refLink = offers.ChannelInfo.refLink 
                                     }
                                 );
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:43:29+00:00Added an answer on May 15, 2026 at 10:43 am
    select new OfferType
    { 
       name = offers.name,
       description = offers.description, 
       startDate = offers.startDate, 
       endDate = offers.endDate, 
       ChannelInfo = 
       new ChannelInfo 
       { 
          refClickThroughLink = offers.ChannelInfo.refClickThroughLink,
          refId = offers.ChannelInfo.refId,
          refLink = offers.ChannelInfo.refLink 
       };
    }
    

    Pardon the syntax. But, you will have to new up the ChannelInfo class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to accomplish the following query (notice .StartsWith): return (from p in _session.Linq<Profile>()
Everything I can find in linq for aggregation has a group by clause. How
I expected the following LINQ query to sort according to FirstName but the OrderBy
I am working on a database access layer project and decided to use Linq
I have a simple LINQ query on ADO.NET Entity Framework as follows var result
I have a LINQ query mapped with the Entity Framework that looks something like
I'm binding a GridView to an LINQ query. Some of the fields in the
Everything is working up to here, I just need to create the method that
Here is a Linq query: Common.ProductType.ProductTypeEnum[] aCustomerProduct = (from customer in repositoryCustomer.GetAll().Where(cp => cp.Email
I've got a situation where I need to have my LINQ to Entities query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.