public async Task<HttpResponseMessage> Post(ScimGroup1 groupDto) { return (await _GroupService.CreateGroup(groupDto)) .Let(group => SetMetaLocation(group, RetrieveGroupRouteName, new { groupId = group.Id })) .ToHttpResponseMessage(Request, (group, response) => { response.StatusCode = HttpStatusCode.Created; SetContentLocationHeader(response, RetrieveGroupRouteName, new { groupId = group.Id }); SetETagHeader(response, group); }); }
public async Task <HttpResponseMessage> Post(ScimGroup1 groupDto) { return((await _GroupService.CreateGroup(groupDto)) .Let(group => SetMetaLocation(group, RetrieveGroupRouteName, new { groupId = group.Id })) .ToHttpResponseMessage(Request, (group, response) => { response.StatusCode = HttpStatusCode.Created; SetContentLocationHeader(response, RetrieveGroupRouteName, new { groupId = group.Id }); SetETagHeader(response, group); })); }
public async Task <HttpResponseMessage> Put(string groupId, ScimGroup1 groupDto) { groupDto.Id = groupId; return((await _GroupService.UpdateGroup(groupDto)) .Let(group => SetMetaLocation(group, RetrieveGroupRouteName, new { groupId = group.Id })) .ToHttpResponseMessage(Request, (group, response) => { SetContentLocationHeader(response, RetrieveGroupRouteName, new { groupId = group.Id }); SetETagHeader(response, group); })); }
public async Task<HttpResponseMessage> Put(string groupId, ScimGroup1 groupDto) { groupDto.Id = groupId; return (await _GroupService.UpdateGroup(groupDto)) .Let(group => SetMetaLocation(group, RetrieveGroupRouteName, new { groupId = group.Id })) .ToHttpResponseMessage(Request, (group, response) => { SetContentLocationHeader(response, RetrieveGroupRouteName, new { groupId = group.Id }); SetETagHeader(response, group); }); }