Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

REST web service is it possible to PUT a List

$
0
0

Hello,

i'm doing a new REST web service

I managed to PUT an Employee using xml format but I wanted to know if it's possible to put employee list always with XML format ?

in the interface we can have something like that:

[OperationContract]
[WebInvoke(Method = "PUT", RequestFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = APStatusUriTemplate.UpdateEmployeeList)]
int UpdateEmployeeList(List<Employee> UpdateEmployeeList);

and in the svc.cs 

public int UpdateEmployeeList(List<Employee> updatedEmployeeList)
{
    return Business.BusinessAccessLayer.UpdatedEmployeeList(updatedEmployeeList);
}

I wanted to know What I should put in the Employee Model class to do that 
the xml provided will have Employees root node and several Employee sub nodes

thanks in advance


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>