public void Patch(string id, [FromBody] MergePatchPhysicalInventoryLineMvoDto value)
 {
     try {
         PhysicalInventoryLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _physicalInventoryLineMvoApplicationService.When(value as IMergePatchPhysicalInventoryLineMvo);
     } catch (Exception ex) { var response = PhysicalInventoryLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeletePhysicalInventoryLineMvoDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.PhysicalInventoryVersion = (long)Convert.ChangeType(version, typeof(long));
         PhysicalInventoryLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _physicalInventoryLineMvoApplicationService.When(value as IDeletePhysicalInventoryLineMvo);
     } catch (Exception ex) { var response = PhysicalInventoryLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeletePhysicalInventoryLineMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.PhysicalInventoryVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    PhysicalInventoryLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _physicalInventoryLineMvoApplicationService.When(value as IMergePatchPhysicalInventoryLineMvo);
                    return;
                }
                // ///////////////////////////////

                PhysicalInventoryLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _physicalInventoryLineMvoApplicationService.When(value as ICreatePhysicalInventoryLineMvo);
            } catch (Exception ex) { var response = PhysicalInventoryLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }