DataSource for Entity Framework supports both visual and "all code" style of programming:
- Use the C1DataSource control if you want point-and-click, RAD-style application development.
- Use the ClientViewSource class if you want to separate your code from GUI but keep the ease of use of the C1DataSource. The ClientViewSource class is independent of GUI; it can be used in code with any of the GUI platforms (WPF, Silverlight, WinForms). It can be used completely separately from GUI, including in the view model layer of an MVVM application. At the same time, the ClientViewSource is the same object C1DataSource uses, so you can keep the ease of use characteristic of C1DataSource (but code-only, without visual designers). In fact, C1DataSource is just a collection of ClientViewSource objects plus visual designer support for them.
- For the most complete control over your code, you can use the third, lowest level of the C1DataSource object mode: the ClientView class. If you prefer pure code, especially (but not only) using the MVVM pattern, this is the recommended level. It is still easy to program with, it is mostly based on LINQ which promotes a functional style of programming, intuitive and expressive.
The rest of this section is devoted to programming using the ClientView class.
See Also