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

  • SEARCH
  • Home
  • 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

everything is working fine with my jqgrid except a small issue. i have defined
I'm trying to accomplish the following query (notice .StartsWith): return (from p in _session.Linq<Profile>()
I'm trying to only return a few columns from a linq to sql query
I am trying to get SQL Dependency notifications working with LINQ. I am successful
I'm using LINQ to query data from database and then bind it to a
I have been trying out some LINQ query can someone please show how to
I have the following Linq-to-SQL query. On line #5 I'm trying to get the
Is there a one-line easy linq expression to just get everything from a simple
Everything was working just fine and on the last publish my wordpress directory is
Everything is working fine until I call the saveFile method (shown below) to write

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.