Solved

Entity Framework - LINQ to Entities query to populate DropDownList control

Posted on 2008-10-08
1
1,834 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
ID: 22677462
This seems to be very helpful.

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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
A short film showing how OnPage and Connectwise integration works.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

911 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

19 Experts available now in Live!

Get 1:1 Help Now