简体   繁体   中英

WinForms 2010 DataBinding and DB Access

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) ]

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM