CompositeType in c# with WCF

Posted by Sutotpal under WCF on 4/15/2011 | Points: 10 | Views : 24032 | Status : [Member] | Replies : 2
Hi frnds,

I want to know that what is Compositetype in C# and how to use it.

[OperationContract] 
CompositeType GetDataUsingDataContract(CompositeType composite);


and When Implementing this

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


and when Calling this Service, How to consume above method and what type of parameter will be pass.

Best Regards,
Sutotpal



Responses

Posted by: Vuyiswamb on: 4/15/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
I have never used them before , and i am not sure what you can use them for , i have found some links related to that

http://www.devart.com/dotconnect/postgresql/docs/CompositeTypes.html
http://en.wikipedia.org/wiki/Composite_data_type



Thank you for posting at Dotnetfunda
[Administrator]

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Proyal on: 6/13/2012 [Member] Starter | Points: 25

Up
0
Down
you can call this method in this way:

ServiceReference1.Service1Client client = new ConsoleApplication1.ServiceReference1.Service1Client();
Console.WriteLine(client.GetData(21));

ServiceReference1.CompositeType CT=new ConsoleApplication1.ServiceReference1.CompositeType();
CT.BoolValue=false;
//CT.StringValue="Royal";

Console.WriteLine(client.GetDataUsingDataContract(CT).StringValue);

Console.ReadLine();

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response