I'll will make ERP software for managing data for business activities. The solution must have two big parts: a WPF application for all the clients and an ASP MVC Web API application for all the client.The API application manage all the public data that is equal for all the clients and store it into a SQL server database on the Azure cloud. The clients could access this data by an API to the web service.The WPF application manage all the private data and store it also on a SQL server database on the server of the client. But here is there a problem. Not all clients has an own server. In this situation the database must also run on a cloud service like Azure.99% of the users use only the WPF application and not the web service. The desktop app access API's from the web service. For both databases (on client and server) I'll use Entity framework 6 with code first migrations.The question is what code design pattern (like MVVM or MVC) can I use for my ERP software that hasn't duplicate code and with a service layer for manage the direction of the data, to the web service or to the client's server farm or if the last case is not possible to the client's server farm on Azure.
Design patterns for ERP software with clients and web service
design patterns;object oriented;coding style;erp
Create a Repository Layer contains and manage all your repositories and business logic, create unit of work class to act as single point to manage your repositories.Create Data Access Layer that will contains your database Layer (EF code first).Create contracts Layer will contains all interfaces of your repositories which you can easily inject it using IoC Create Services Layer which will contains any 3rd party services and custom services,  your ERP will connect to.use factory design pattern to define your services configurations to be easily to upgrade or downgrade your service API.You can also create Helper Layer contains all Helper classes, log and exception handling.Use IoC to inject your repositories and services.You can return to Mr. Martin Fowler reference (design patterns of enterprise applications) very useful book.