tags:

views:

28

answers:

1

How to add objects to wcf services

+2  A: 

A WCF service is a set of operations on a service:

[ServiceContract]
interface MyService
{
  [OperationContract]
  void DoSomething(SomeClass input);
}

You can define the data being passed around into those service methods (and possibly out as return parameters) as DataContract:

[DataContract]
class SomeClass
{
  [DataMember]
  string Name { get;set; }
  [DataMember]
  string FirstName { get;set; }
}

What those classes look like, is totally up to you.

Is that what you want to know? Your question is not very clear......

If it's not what you're asking - please rephrase your question and make it clearer - where and how do you want to add objects? Add objects to what?

Marc

marc_s