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 6158361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:56:41+00:00 2026-05-23T20:56:41+00:00

My code is as follows: var contactGroups = context.ContactGroups.Where(cg => cg.ContactID == contact.ID); var

  • 0

My code is as follows:

var contactGroups = context.ContactGroups.Where(cg => cg.ContactID == contact.ID);

var MyContactGroups = from cg in context.ContactGroups
     where cg.Contact == contact.ID
     select new {
     Title = cg.Title,
      GroupName = cg.GroupName 
     };

The result of contactgroups and MyContactGroups doesn’t allow me to access any of the records of ContactGroups..

i.e. When I use MyContactGroups I cannot access any of the columns such as GroupName or Title. For example, I can’t use MyContactGroups.Title

I have posted the video of my issue here:
http://screencast.com/t/i0ydKQSou

Any ideas what I am doing wrong please?
Thanks!

  • 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-23T20:56:42+00:00Added an answer on May 23, 2026 at 8:56 pm

    MyContactGroups is going to be an IEnumerable<ContactGroup>. You’ll need to get an individual item off of it to access the properties of a ContactGroup.

    foreach(var contactGroup in MyContactGroups)
    {
        Console.WriteLine(contactGroup.Title);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code that I tried is as follows: var dataO = new Object(); dataO.numberId
I've got code as follows: var smtpClient = new SmtpClient(my.mail.server); smtpClient.Send(mailmessage); however the send
My JS code is currently as follows: var today = new Date(), d =
My js code is as follows:- var earlierdate=new Date(2012,09,22); alert(earlierdate.getDay()); var date2 = new
I have a piece of javascript code as follows: var data = { ...
My code looks like follows var html = $(el).html().toString(); html = '2012-05-10'; var re
I have code as follows: $(#item_select).change(function() { var params = $(#item_select option:selected).val(); $.post('/account/ar_form.php', {idata:
My JavaScript code is as follows: $(document).keydown(function(event){ var move, inter; clearInterval(inter); inter = setInterval(move
My code is as follows: <script> var i = 2; $(document).ready(function(){ $(#newrow).click(function(){ $(#maintable).append('<tr> <td><input
I'm trying to follow some example code from microsofts mdn site.. var WshShell =

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.