A good example of combining WPF + WCF + Entity Framework

I plan to create a new data-driven client / server application with the flexibility of using WPF, Silverlight, and mobile clients. I am already well versed in WPF and must learn how to implement the back end. Everything I read indicates the use of WCF + Entity Framework.

I have yet to find a realistic example of combining these three technologies. I want to use WPF data binding to be able to easily bind to database objects in a way that avoids as much procedural code as possible.

I looked at this Prism-based example, but it looks like it never ended, in fact it does nothing, it's basically the glorified "Hello World!"

+6
source share
5 answers

I did digging, and here is what I found:

Karl Schifflett Netflix Stuff Application (WPF, MVVM, Data Services)

IssueVision (Silverlight, MVVM, WCF RIA Services, Entity Data Model)

+3
source

Are you looking at the walkthrough below, which includes only WPF + WCF + Entity Framework:

http://msdn.microsoft.com/en-us/library/dd465161.aspx

In this walkthrough, you will create a WPF application that contains data-bound controls. The controls are bound to client records that are encapsulated in the WCF data service. You will also add buttons that customers can use to view and update records.

This walkthrough shows the following tasks:

  • Creating an entity data model that is created from data in the AdventureWorksLT sample database.
  • Create a WCF data service that provides data in an entity data model for a WPF application.
  • Create a set of data-bound controls by dragging items from the Data Sources window to the WPF Designer.
  • Create buttons that move back and forth across customer records.
  • Create a button that saves data changes in controls for the WCF data service and primary data source.
+5
source

Demonstrates WPF, MVVM, WCF, WF, and Entity Framework 6.0 , perhaps a great demo for you. and there are other layered examples of architecture.

+3
source

Assuming you're using Visual Studio 2010, then you might want to take a look at WCF data services. Here is an article about it:

Entity Framework 4.0 and WCF 4.0 Data Services in Visual Studio 2010

The article also has a link to sample code, but I am not familiar with Silverlight and cannot start it yet.

0
source

I was able to connect my WPF application using the following examples:

Getting started with WCF (Windows Communication Foundation) - Quickly run and debug - https://blogs.msdn.microsoft.com/brunoterkaly/2013/10/18/getting-started-with-wcf-windows-communication-foundation-running -and-debugging-quickly /

WCF Programming - How to write a client application that connects to the WCF service https://blogs.msdn.microsoft.com/brunoterkaly/2013/10/28/wcf-programming-how-to-write-a-client-app-that -connects-to-a-wcf-service /

0
source

Source: https://habr.com/ru/post/916944/


All Articles