WinForms & VB.Net & Databinding, ICollection vs. ObservableColection
Posted: Tue 23 Apr 2013 15:37
Hello all,
I want to use databinding with VB.Net, WinForms and EF (DBContext).
Actually there is a Problem to show the Data of the Navigation Properties.
Details you can read here:
http://entityframework.codeplex.com/wik ... %2c%202012
under "Database First WinForms data binding".
The recommend to implement a own T4 template for databinding with winforms.
Actually I changed in the T4 template the type of the navigation property. I replaced
ICollection throug ObservableCollection(of T) and I importet System.Collections.ObjectModel.
With this change databinding seems to work fine.
Now my Questions:
-Is that the right way to use databinding with vb.net and WinForm and what are the
disadvantages of this solution?
-Why doesn't DevArt provide a T4 Template for Datebinding with WinForms. Do you
think that this is a possible option?
Best regards and thank you for every answer.
Ansgar
I want to use databinding with VB.Net, WinForms and EF (DBContext).
Actually there is a Problem to show the Data of the Navigation Properties.
Details you can read here:
http://entityframework.codeplex.com/wik ... %2c%202012
under "Database First WinForms data binding".
The recommend to implement a own T4 template for databinding with winforms.
Actually I changed in the T4 template the type of the navigation property. I replaced
ICollection throug ObservableCollection(of T) and I importet System.Collections.ObjectModel.
With this change databinding seems to work fine.
Now my Questions:
-Is that the right way to use databinding with vb.net and WinForm and what are the
disadvantages of this solution?
-Why doesn't DevArt provide a T4 Template for Datebinding with WinForms. Do you
think that this is a possible option?
Best regards and thank you for every answer.
Ansgar