In this article, I m explain How to use wcf service in MVC 5.
In previous post I explained How to Create WCF Service in Visual Studio 2013.
Now Continue with previous post.
Create new project, Right Click on Solution Explorer and add new project.
Select ASP>NET Web Application with .NET Framework 4.5.
Select Empty MVC Template.
Your MVC project add in solution explorer.
Now first copy wcf service url.(Please first check previous post here)
Add New Controller in MVC application.
Now add following code in Index action.
Now Select Template List and Model class.
Your View code look like this.
Now Run Application(Ctrl + F5).
Enjoy..!
In previous post I explained How to Create WCF Service in Visual Studio 2013.
Now Continue with previous post.
Create new project, Right Click on Solution Explorer and add new project.
Select ASP>NET Web Application with .NET Framework 4.5.
Select Empty MVC Template.
Your MVC project add in solution explorer.
Now first copy wcf service url.(Please first check previous post here)
Now EmployeeService service references add in your WebApplication.
Now right click on Employee service and Click on Configure Service Reference.
Now uncheck Reuse type in referenced assemblies and click ok.
Add New Controller in MVC application.
Now add following code in Index action.
Right click on Action method and Add View.
Now Select Template List and Model class.
Your View code look like this.
Now Run Application(Ctrl + F5).
Enjoy..!
Post a Comment