Beispiel #1
0
 public void Patch(string id, [FromBody] MergePatchAudienceDto value)
 {
     try {
         AudiencesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _audienceApplicationService.When(value as IMergePatchAudience);
     } catch (Exception ex) { var response = AudiencesControllerUtils.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 DeleteAudienceDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         AudiencesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _audienceApplicationService.When(value as IDeleteAudience);
     } catch (Exception ex) { var response = AudiencesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }