|
-
Apr 30th, 2018, 07:42 PM
#2
Re: Bind a DataGridView to a table in Entity Framework
You don't. You bind to a list of some sort. You query your EF context in an appropriate manner and then call ToList or ToArray on the result to get a generic List or an array, then you bind that to your DataGridView, preferably via a BindingSource. If you want to be able to add and remove items, a List would be the better option.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|