MSDN Archive Home
Help and FAQs
Employee Portal ASP.NET MVC 1.0 WCF Library and Application
All Resource Updates
Change History (all pages)
This is a sample code for starters for understanding WCF and MVC.
Mostly targeted to understand WCF
1 Created a Data Class Library
This is used to get data from any database.
I used some sample data which i hardcoded for the example. You can get the values from any DataBase as required.
This layer is used to fetch data as an object which will be created in a seperate library (Here its EmployeeModel library)
2. Created EmployeeModel library (This acts as a model object for MVC)
3 Created a WCF Service Library.
Added EmployeeService.cs and IEmployeeService.cs with one method.
Added Employee.cs contracts file for the library.
Changed the Service Contracts to point to EmployeeServiceLibrary.EmployeeService
Modified the End Points to connect to EmployeeServiceLibrary.EmployeeService contract.
Creaed a new contract to use EmployeeServiceLibrary.EmployeeService
Connected this application to the data class library created to fetch the data.
Tested the application.
4 To host the above created WCF Service Library we need to create a WCF Service Application Website.
In this we need to remove the unnecessary classes and add the reference to the above WCF Service Library and change the
Service.svc file to point to EmployeeServiceLibrary.EmployeeService contract and open the serice.svc file in browser to test the application.
5 Now use the svcutil.exe utility to create the web.config and ClientService connection files copy these to the client project and test the application
Dec 10 2009 at 11:51 PM
, version 2
Sign in to add a comment
Thu Dec 10 2009 at 8:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.