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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:09:57+00:00 2026-05-11T17:09:57+00:00

Forgive me if this has been asked before; I did a search but couldn’t

  • 0

Forgive me if this has been asked before; I did a search but couldn’t find anything that specifically answered this question, but I’d be happy to be referred.

I’m taking a peek at both the Entity Framework and LINQ to SQL, and while I like the systems (and of course the LINQ integration) I’m a little skeptical on the data-binding aspect. I’ve taken query results and inspected them, and they don’t appear to implement the standard .NET list-binding interfaces (IBindingList, and more importantly ITypedList), leading me to believe that binding them to a grid (or anything else) is going to use reflection to get/set my entity properties. This seems like a comparatively expensive operation, especially when all of the code is generated anyway and could implement the interfaces.

Does anyone have any insight into this? Is reflection used to get/set the value of the properties? If yes, does this have a performance impact that’s noticeable, and does anyone have any idea why they went this route?

Edit

I’m actually concentrating on whether or not ITypedList is implemented somewhere along the way, as that’s what has the capability to provide an explicit mechanism for defining and interacting with properties without resorting to reflection. While I didn’t have a LINQ to SQL project up, I did inspect a simple Entity Framework entity query result, and it did not appear to implement ITypedList. Does anyone know if I’m just looking at something incorrectly, or if not why this is the case?

Edit 2

After accepting Marc’s answer, I thought it might be helpful for others if I posted some simple code I used to seamlessly implement his solution. I put the following in the static constructor for my class:

public static ContextName()
{
    foreach(Type type in System.Reflection.Assembly.GetExecutingAssembly()
        .GetTypes())
    {
        if (type.GetCustomAttributes(typeof(System.Data.Linq.Mapping
            .TableAttribute), true) != null)
        {
            System.ComponentModel.TypeDescriptor.AddProvider(
                new Hyper.ComponentModel.HyperTypeDescriptionProvider(
                    System.ComponentModel.TypeDescriptor.GetProvider(
                        type)), 
                type);
        }
    }
}

While this is for LINQ to SQL, I’m sure an equivalent version could be written for the Entity Framework. This will scan the assembly for any types with the Table attribute and add a custom provider for each of them.

  • 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-11T17:09:57+00:00Added an answer on May 11, 2026 at 5:09 pm

    The Expression API that underpins LINQ etc is founded on reflection (MemberInfo), not the component-model (PropertyDescriptor etc) – so there is not a huge requirement for ITypedList. Instead, the contents are inferred from the T in IQueryable<T>, IEnumerable<T> and IList<T> etc.

    The closest you might get is IListSource, but that will still just be a shallow wrapper around a proper typed list.

    If performance of runtime binding (to PropertyDescriptor) is key, you might want to look at HyperDescriptor – which uses Reflection.Emit and TypeDescriptionProvider to wrap the component-model.

    Re the “why” etc; note that in almost all cases with LINQ-to-SQL and EF the Expression (or the “create and set members” part) is going to be compiled to a delegate before it is invoked – so at runtime there is no huge reflection cost. And likewise, with LINQ-to-Objects everything is already compiled (by the C# compiler).

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

Sidebar

Related Questions

Forgive me if this has been asked repeatedly, but I couldn't find an example
Forgive me if this has been addressed before, couldn't find anything. I am animating
Forgive me if this has been asked before, but I was unable to find
Forgive me if this has been asked before, but I assure you I've scoured
Forgive me if this has been asked before, I am sure it has but
If this has been asked before please forgive me, I could not find it.
Forgive me if this question has been asked before but I am new to
Forgive me if this has been asked before, I'm just unable to find an
Forgive me if this has been answered before, I couldn't find an answer where
Forgive me if this has already been asked, I couldn't find it. 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.