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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:05:07+00:00 2026-05-26T23:05:07+00:00

I am creating a generic function that have the function definition as: public static

  • 0

I am creating a generic function that have the function definition as:

  public static List<T> Func_IEnumerable<T>(this IEnumerable<T> q, ObjectContext dc, string CacheId)

and one function as

  public static List<T> Func_IQueryable<T>(this IQueryable<T> q, ObjectContext dc, string CacheId)

The question is that I want to find out the tables name,procedure name,function name and/or view name referenced in the Ienumerable or IQueryable Query

Is it possible with the Linq framework

And if not then we may convert the IEnumerable into System.Data.Objects.ObjectQuery and finally using ToTraceString to get the pure SQL.

Now from Pure Sql can we get the object names.

Whether Sql Server has some functions to do the same if not, then how should I parse it to get desired results.

Thanks,

Any help is appreciated.

  • 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-26T23:05:07+00:00Added an answer on May 26, 2026 at 11:05 pm

    If you want to use SqlCacheDependency (featrue heavily dependent on SQL) why are you using EF (feature which tries to hide SQL as much as possible) in the first place? You are combining two features which were not designed to work together – that happens quite often in .NET framework.

    IQueryable can be converted to ObjectQuery only if the object is ObjectQuery = it was created as query on exposed ObejctSet and you have never called ToList, AsEnumerable or other executing method on it. This also means that calling to stored procedure cannot be converted to ObjectQuery.

    Real IEnumerable (executed query) cannot be converted to ObjectQuery and you cannot get any information about source of the result set from IEnumerable. This is case for all queries where ToList or AsEnumerable was called and for example for all calls to mapped stored procedures.

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

Sidebar

Related Questions

for that past couple of weeks I have been creating generic script that is
I try to make a generic function in C++, that creating an array of
I've created a small utility function for string conversion so that I don't have
I'm not really familiar with creating generic methods, so I thought I'd put this
I am looking into creating type-safe generic controls. This is targeting the (reduced) generics
I'm creating a class named TetraQueue that inherits System.Collections.Generic.Queue class overriding the Dequeue method,
That may sound a little confusing. Basically, I have a function CCard newCard() {
This is a fairly generic question in that I'm just wondering what potential options
I am having an issue using BinaryFormatter.Serialize. I have this generic extension method to
I'm having a problem with a generic class I'm creating in Scala. I have

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.