none
Same Object Class In Two Web Services RRS feed

  • Question

  • Dear All

    thanks in advance.

    I added two web services (WebService1 and WebService2) into my web project.

    WebService1 include a web service to get order (class WebService1.Order) by the order number 

    WebService2 include a web service to add a discount to order (class WebService2.Order)

    Infact WebService1.Order and WebService2.Order come from shared library Common.Order so the structure are the same.

    However, when I would like to get an order and add discount in my web project

    WebService1.Order order = WebService1.GetOrder("ON1500001");

    WebService2.AddDiscount(order); <-- this expects WebService2.Order

    Since Order is a complicated class, it contains many fields and list of other objects, 

    is there a fast way to convert WebService1.Order to WebService2.Order?

    Thanks.


    Best Regards
    mintssoul


    • Edited by mintssoul Wednesday, June 10, 2015 4:17 AM
    Wednesday, June 10, 2015 4:15 AM

Answers