Chapter 17. Entity Framework and Windows applications
This chapter covers
- Customizing entities for binding
- Data binding with Windows Forms
- Data binding with WPF
In a web application, the browser receives HTML and then renders it. When the rendering is finished, the browser relies on JavaScript to add behavior to the page. There are many JavaScript libraries (jQuery, Ext JS, Scriptaculous, and so on) that can help with this, but whatever your choice is, you work on client-side objects.
Applications that use web services to manage data take the same approach. In the application, you use classes that are generated by the WSDL inspector. These classes contain the same data as the service classes (which can be Entity Framework entities), but they’re just local copies. This means that you always work with objects that aren’t generated by Entity Framework.
But loads of Windows applications don’t have a tiered architecture and directly access the database through Entity Framework. In such situations, you can model your classes to let them interact with the binding capabilities of both Windows Forms and Windows Presentation Foundation (WPF) applications.