0

I'm a Silverlight developer that has to work on a WinForms project again, but I'm not too excited to leave the wonderful world of data binding behind. In the past I always used DataSets with SQL queries. Are there any good tutorials to update my skills?

Some comments on what I want:

  • Regarding Entity Framework, it seems nice, but the last time I checked it did not handle custom situations very well. Is there perhaps a more hybrid customised solution where I have more control in my hands? For example, a custom data source with custom actions on save.
  • I don't want to use raw text in binding lookups, and already found a useful article for Safe WinForms Databinding in C# 3, but there are probably better standards in .NET 4.

Sample Form

[ Employee Selection (Dropdown - to populate fields below, query DB on change) ]
[ Employee Detail (individual fields - fairly generic) ]
[ Grid (or list) with CheckBoxes for linked responsibilities (not so generic) ]

Peet Brits
  • 2,911
  • 1
  • 31
  • 47

1 Answers1

0

I'm not a Silverlight developer, but as far as I know, there is not a big difference in dataBindings in Silverlight and WinForms applications.

As for ORMs (if you don't like Entity framework), you could try LINQ to SQL. The great blog tutorial is here. But Microsoft recommends to use EF instead of LINQ to SQL in new applications. Also NHibernate is a good alternative.

As for exactly DataBindings in WinForms, check this post. THen you'll be able to compare that to what you know from Silverlight.

Sasha
  • 8,537
  • 4
  • 49
  • 76
  • Silverlight works great with the MVVM pattern, which is what I'll use for comparison. I'm a bit busy with other things right now, but I will look at your links and get back to you. – Peet Brits Jan 18 '12 at 13:48
  • You can use MVVM in WPF and there are MVVM patterns for WinForms as well. Here some links: http://www.codeproject.com/KB/WPF/WpfMvvmQuickStart.aspx http://www.codeproject.com/KB/WPF/WpfMvvmQuickStart.aspx http://stackoverflow.com/questions/595469/ui-design-pattern-for-windows-forms-like-mvvm-for-wpf Hope that will help... – Sasha Jan 18 '12 at 15:41