// POST api/users/5/roles public async Task <HttpResponseMessage> Post(string id, PortalRoleModel role) { // Add user role await _userService.AddRoleAsync(id, role.Name); return(Request.CreateResponse(HttpStatusCode.Created, (PortalRole)role)); }
// DELETE api/users/5/roles public async Task <HttpResponseMessage> Delete(string id, PortalRoleModel role) { await _userService.DeleteRoleAsync(id, role.Name); return(Request.CreateResponse(HttpStatusCode.OK)); }