Beispiel #1
0
 public void Patch(string id, [FromBody] MergePatchRoleDto value)
 {
     try {
         RolesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _roleApplicationService.When(value as IMergePatchRole);
     } catch (Exception ex) { var response = RolesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Beispiel #2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteRoleDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         RolesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _roleApplicationService.When(value as IDeleteRole);
     } catch (Exception ex) { var response = RolesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }