In this article, I am explain how to use WCF service.
First Open Visual Studio 2013. Create New Project and select WCF Service Application and give name WCFdemo.
Then Click ok. Now In Solution Explorer Right Click on WCFdemo project and Add New Item ADO.net entity data model.
Add Database here and select Table.
Now Your Solution explorer look like this.
First Open Visual Studio 2013. Create New Project and select WCF Service Application and give name WCFdemo.
Then Click ok. Now In Solution Explorer Right Click on WCFdemo project and Add New Item ADO.net entity data model.
Add Database here and select Table.
Now Your Solution explorer look like this.
Now Add New item WCF Service.
Select WCF Service and give name.
Now EmployeeServices.svc and IEmployeeServices.cs file add in solution explorer.
Now Open EmployeeServices.svc.cs file and write following code.
Here Employee is my database table and m9codersEntities is entity name.
Now Open IEmployeeServices.cs and write method name of EmployeeServices.svc.cs file.
Now Build Project. (shortcut- F6)
Now Run EmployeeServices.svc file.(ctrl+F5)
Then Open WCF Client popup window.
And your Service Adding...
After Service added successfully then copy url and paste into your browser.
You can see your all Method here and now use in any project.
In Next article i will explain how to use wcf service in MVC.
Post a Comment