I have created a Web Application in MVC 3 with razor. My solution structure is as follows:
A) Web Tier - Comprises of MVC
B) Business Layer
C) Data Tier
I am required to deploy the three layers separately on 3 servers, on IIS.
Can anyone advise how to proceed ?
Thanks
Since you are concerned about where to deploy your edmx file, I will just elaborate on the business layer.
First I would reiterate the distinction between layer and tier. You mention a seperate physical server for your business logic, therefore my answer will assume a physically separate business tier. And will henceforth refer to as a tier.
The EDMX file, although coupled to your database schema, is a business tier artifact. IT will have to be on the same physical location (in your case) as your other business classes (entities, data access plumbing, etc…)
In your situation, your biggest hurdle is the B component. Deploying A and C (a web application and a database respectively) onto separate physical tiers is not particularly difficult.
You will definitely need to build a WCF service Facade on top of your business logic classes to expose their functionality to the MVC website that resides on a different server. There are ample articles out there elaborating on the Facade pattern, but this is a direct approach that involves minimal changes in your architecture.