Manas Mohapatra

Manas Mohapatra

  • 92
  • 20.4k
  • 16.7m

Entities in MVC and WCF

Jul 2 2014 5:13 AM

I am working in an MVC web application. This application also use WCF service and Entity-framework. In solution explorer I have two projects 1. MVC 2. WCF Service. I am little bit confuse how should I use entities in MVC and WCF service.

For instance I have created Employee.cs class in Model folder in MVC. And in controller I call a method of Get Employee() of WCF service which returns employee class type. In WCF service how I will return as employee type because I added that class in Model folder of MVC project which is not accessible to MY WCF service project.

So in this case how I should use that entity in such way that it can be accessible to MVC as well to my WCF service.

Please let me know you need more clarification..


Answers (2)