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); } }
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); } }