Solved

Entity Framework - LINQ to Entities query to populate DropDownList control

Posted on 2008-10-08
1
1,840 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 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