David Chen

David Chen

  • NA
  • 50
  • 45.9k

WCF Method that takes an object as its parameter

Mar 11 2013 5:52 PM

I'm still quite new the WCF Services

School assignments that I done on WCF were writing simple methods of WCF service which accepts strings or int or bool values.

However, I came across this wcf service that wasn't done by myself, and now I am required to write C# client to consume this service.

This WCF has a GetFees method which takes a Student Object as parameter (from WCF's Student DataContract)

My assignment is to Get Fees of particular students. The information i'm given are

StudentID=1, FirstName=Fernando, LastName=Gadd, Grade=4

StudentID=3, FirstName=Allan, LastName=Pascoe, Grade=1

Currently stuck on how to approach this question, but i'm thinking something like

Fee[] newFee1 = client.GetFees(new Student("1", "Fernando", "Gadd", "4".......

Fee[] newFee2 = client.GetFees(new Student("3", "Allan", "Pascoe", "1".......

Thank you whoever can help


Answers (4)