コード例 #1
0
 public void Patch(string id, [FromBody] MergePatchPermissionDto value)
 {
     try {
         PermissionsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _permissionApplicationService.When(value as IMergePatchPermission);
     } catch (Exception ex) { var response = PermissionsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeletePermissionDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         PermissionsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _permissionApplicationService.When(value as IDeletePermission);
     } catch (Exception ex) { var response = PermissionsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }