none
Passing list as a parameter to a wcf restfull service. RRS feed

  • Question

  • I have created a wcf rest service with multiple operation contract.
    One of the operation contract should receive list of parameters.
    For ex.: refer the code block

    This particlualr contract fetches all regions of specified customer.
    For single customer it works fine but what if I have to give multiple customers .
    How to handle such scenarios?
    Is it that I have to modify contract to
    List<string> getregions(List<string> customer);  

    Or How to handle such uri
    somedomain/RegionList/{customer1,customer2,customer3}


    Also if any good tutorial to handle this plz convey it.
    Thanks .
    [OperationContract]
    {WebInvoke(URITemplate="RegionList/{customer}")
    List<string> getregions(string customer);




    • Edited by Amolrs Saturday, April 16, 2016 5:31 AM
    Saturday, April 16, 2016 5:15 AM

Answers