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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:31:18+00:00 2026-06-15T14:31:18+00:00

Possible Duplicate: LINQPad error: ‘UserQuery’: cannot derive from sealed type ‘My.Entity.Framework.CustomDataContext’ i am running

  • 0

Possible Duplicate:
LINQPad error: ‘UserQuery’: cannot derive from sealed type ‘My.Entity.Framework.CustomDataContext’

i am running this query in LINQPad 4 with C# Expression as language

from t in typeof(UserQuery).GetProperties()
where t.Name == "tablename"
from c in t.GetValue(this,null).GetType().GetGenericArguments()[0].GetFields()
select c.Name

but when i use this query in C# web application it gives error no reference of UserQuery

var result = from t in typeof(UserQuery).GetProperties()
             where t.Name == "tablename"
             from c in t.GetValue(this,null).GetType().GetGenericArguments()[0].GetFields()
             select c.Name

and vs 2012 intellisense didnt picked any reference of it. please tell me which library reference is needed to be added for execution of above query or which class object is needed to be created for referencing ??

currently i m using EF 5.0 and DbContext object which is generated when creating EF data model by Database First Approach

i prefer answer which related to DbContext

  • 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-06-15T14:31:20+00:00Added an answer on June 15, 2026 at 2:31 pm

    It sounds like you’re trying to query the properties of a typed data context.

    To get this working in Visual Studio, replace UserQuery with the name of your typed DataContext.

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

Sidebar

Related Questions

Possible Duplicate: How can I understand nested ?: operators in PHP? Why does this:
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's
Possible Duplicate: oracle PL/SQL: sort rows I run this query: Select a.product, sum( case
Possible Duplicate: php == vs === operator Reference - What does this symbol mean
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
Possible Duplicate: What's the @ in front of a string in C#? This is

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.