Chapter 16. Entity Framework and n-tier development
This chapter covers
You can solve many problems with a service-oriented application. Sometimes these types of applications are used by client applications (clients from now on) within a larger system. Other times, clients are developed by third-party organizations, and your duty is to build services. This means that you have no GUI to develop—just services.
Whatever the client is, the application must be separated into different physical tiers that are completely disconnected from each other and that communicate through a specific interface: the contract. In the context of Entity Framework, working in a disconnected way is the obvious pattern for these types of applications because the context can’t be propagated from the server to the client tier, which means modifications made on the client side can’t be tracked, and a new context for each request is required on the server side.
In chapter 6, you learned that a degree of discipline is required to work in a disconnected scenario. Although the code on the client side is simple (the client code isn’t even aware that Entity Framework is used by the server), persisting modifications on the service side requires a certain amount of code.