A full implementation of a middle tier built using the peasy framework and sample consumer clients (WPF, Web API, and ASP.NET MVC) can be found here. You can clone the repo or download the entire solution as a zip.
The sample application is a ficticious order entry / inventory management system, and provides both WPF and ASP.NET MVC UI clients. All efforts were made to keep these applications as simple as possible to keep the focus on how a middle tier is written with peasy and consumed by multiple clients.
The easiest way to get up and running is to set the WPF, ASP.NET MVC, and Web API projects as the startup projects and run the application. By default, the WPF and MVC projects are configured to use http implementations of the data proxies that communicate with the Web API project. In turn, the Web API project is configured to use in-memory implementations of the data proxies.
However, there is a multitude of configuration possibilities. The configurations section provides details on setting up many potential configurations.
The sample applications can be configured to interact with a SQL Server database. Here are the steps to setup a SQL Server database for use by the sample applications:
1.) In package manager console, select Orders.com.DAL.EF
in the Default project drop down list
2.) Execute the following command: update-database -verbose
Because these clients consume a middle tier written with peasy, they can be configured in different ways to suit your needs. Below are multiple available configurations that serve to showcase how you might run and/or deploy applications consuming your middle tier written with peasy.
- WPF → In Memory
- WPF → SQL Server
- WPF → Web API → In Memory
- WPF → Web API → SQL Server
- ASP.NET MVC → In Memory
- ASP.NET MVC → SQL Server
- ASP.NET MVC → Web API → In Memory
- ASP.NET MVC → Web API → SQL Server
- Multiple Clients → Web API → (In Memory or SQL Server)
An application walkthru of the WPF Application can be viewed here.
An application walkthru of the ASP.NET MVC Application can be viewed here.
An overview of the solution and all of the projects can be viewed here.
Please consider showing your support by starring the project.