Linq2SQL or EntityFramework and databinding
- by rene marxis
is there some way to do databinding with linq2SQL or EntityFramework using "typed links" to the bound property?
Public Class Form1
Dim db As New MESDBEntities 'datacontext/ObjectContext
Dim bs As New BindingSource
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
bs.DataSource = (From m In db.PROB_GROUP Select m)
grid.DataSource = bs
TextBox1.DataBindings.Add("Text", bs, "PGR_NAME")
TextBox1.DataBindings.Add("Text", bs, db.PROB_GROUP) '**<--- Somthing like this**
End Sub
End Class
I'd like to have type checking when compiling and the model changed.