WCF - Service Contract

Hi. I am going through the following tutorial:

http://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/walkthrough_working_with_WCF/

I created a new project, which generated the code at the bottom, but I am confused as to where to put the following code at point 2
2.Next we need to create the service contract for the web service. Add an interface named IHelloWorldService and paste in the following code:
[ServiceContract]
public interface IHelloWorldService
{
    [OperationContract]
    string SayHelloTo(string name);

    [OperationContract]
    HelloWorldData GetHelloData(HelloWorldData helloWorldData);
}

Open in new window


using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace HelloWorldWcfHost
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging.
    public class Service1 : IService1
    {


        public string GetData(int value)
        {
            return string.Format("You entered: {0}", value);
        }

        public CompositeType GetDataUsingDataContract(CompositeType composite)
        {
            if (composite == null)
            {
                throw new ArgumentNullException("composite");
            }
            if (composite.BoolValue)
            {
                composite.StringValue += "Suffix";
            }
            return composite;
        }


    }
}

Open in new window

Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anil GolamariCommented:
Hi,

When you create a new WCF project it will create both Helloworld.svc and IHellowworld.cs files. You can add code base for Service contract in IHellowworld.cs file. Below two links has step by step process to create a WCF Service.

http://www.c-sharpcorner.com/UploadFile/mahakgupta/a-simple-example-of-wcf-service/

http://www.codeproject.com/Articles/406096/A-beginners-tutorial-for-understanding-Windows

Thanks.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi. Thanks, but would you be able to explain this a little more simply. I have attached an image of my whole solution
Image2.jpg
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi
These articles are helping me understand, so thanks very much for the links
Anil GolamariCommented:
You will have service contract code base under IService.cs file. When you create a service you will already have Service contract, Data contract entries in this page. When you have open IService.cs file in your solution you will find them.
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi. Thanks. I created a VB.net project in VS 2010 and it makes a lot more sense to me now
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WCF

From novice to tech pro — start learning today.