How To Consume Wcf Service In Mvc 5
-
- Updated date January 07, 2015
- 87.7k
- ane
In this article, I am explicate how to use a WCF service in MVC five.
Right-click on Solution Explorer and add together a new project.
Select ASP.Cyberspace Web Application with .Internet Framework 4.v.
Select Empty MVC Template.
Your MVC project volition be added to the Solution Explorer.
Now showtime copy the WCF service URL. (Please commencement check previous article here.)
Now an EmployeeService service reference is added to your WebApplication.
Now right-click on the Employee service and click on Configure Service Reference.
Now uncheck Reuse type in referenced assemblies and click OK.
Add a New Controller to the MVC application.
Now add together the post-obit code to the Index activeness.
Right-click on the Action method and Add View.
Now Select Template List and Model class.
Your View code will look like this.
Now run the application (Ctrl + F5).
How To Consume Wcf Service In Mvc 5,
Source: https://www.c-sharpcorner.com/UploadFile/b07128/how-to-use-wcf-service-in-mvc-5/
Posted by: hickstung1962.blogspot.com

0 Response to "How To Consume Wcf Service In Mvc 5"
Post a Comment