WCF: How to return a datacontract object with a specific value
[ServiceContract]
public interface Imyjob
{
[OperationContract]
Job GetJobInfo(String fn, String ln);
}
[DataContract]
public class Job
{
[DataMember]
public String companyName { get; set; }
[DataMember]
public int positionNumber { get; set; }
[DataMember]
public String positionTitle { get; set; }
[DataMember]
public String positionDescription { get; set; }
}
I'm learning C# WCF service, I define a DataContract and those details all
saved in a txt file, for example, currently i get 1 as
positionNumber(under datacontract class Job). How can i return Job only
contain "1" positinNumber?
public class myjob : Imyjob
{
public Job GetJobInfo(String fn, String ln)
{
Job jobresult = new Job();
return ???;
}
}
No comments:
Post a Comment