Click here to Skip to main content
15,881,882 members
Articles / Programming Languages / C#

Design the WCF Service without Implementing Interface

Rate me:
Please Sign up or sign in to vote.
4.00/5 (5 votes)
31 Mar 2012CPOL1 min read 32.4K   418   10  
Design the WCF service without implementing interface
using System;
using System.ServiceModel;
using System.ServiceModel.Web;


namespace WCFServiceWithOutUsingInterface
{
    // NOTE: Not implemeting the Inferface and using inferface attribute directly to class
    [ServiceContract ]
    public class Service1 
    {
        [OperationContract]
        public string DisplayName(String value)
        {
            return string.Format("You Name is : {0}", value);
        }

        
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
United States United States
Working on Microsoft Technologies and Cloud computing.

Comments and Discussions