Solved

Entity Framework - LINQ to Entities query to populate DropDownList control

Posted on 2008-10-08
1
1,830 Views
Last Modified: 2013-11-11
Experienced .NET web developer here looking to get going on all this Entity Framework stuff. I have a book ordered, but it doesn't ship till December! I have the entity data model created from my database and made a few modifications to that and I think I have a fair grasp on all that. I've also managed a couple of LINQ queries to return string lists of values from a single property queried across a range of objects (such as 'from c in entityModel.Contacts select c.Name;'). What I'd like to see is a simple example of is how to write a method like getContactList() to query my Entity Data model and return a ContactID and Name in some form that can be bound to a DropDownList control.

Thanks
0
Comment
Question by:danburyit
1 Comment
 
LVL 1

Accepted Solution

by:
danburyit earned 0 total points
Comment Utility
This seems to be very helpful.

http://www.primaryobjects.com/CMS/Article95.aspx
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now