コード例 #1
0
 /// <summary>
 /// Sends a POST to '/api/organisation/{id}/relationshiptype/{key}/relationships'
 /// </summary>
 /// <param name="id">a path parameter (no description)</param>
 /// <param name="key">a path parameter (no description)</param>
 /// <param name="model">a body parameter (no description)</param>
 /// <param name="top">a query parameter (Sets the maximum number of results to return)</param>
 /// <param name="skip">a query parameter (Sets the number of results to skip, before return up the $top number of matching items.)</param>
 /// <param name="inlinecount">a query parameter (Determines if the count and total number of results should be included as part of the result set)</param>
 /// <param name="filter">a query parameter (OData filter identifying a subset of results to return.)</param>
 /// <param name="orderby">a query parameter (OData order-by syntax to order results by one or more fields in ascending or descending order.)</param>
 /// <returns></returns>
 public static RestOperation CreateRelationship(string id, string key, CreateRelationship model, int? top = null, int? skip = null, string inlinecount = null, string filter = null, string orderby = null)
 {
     return new RestOperation("POST", "api/organisation/" + id + "/relationshiptype/" + key + "/relationships")
         {
             Content = model,                    QueryParams =
                 {
                      {"$top", top},
                      {"$skip", skip},
                      {"$inlinecount", inlinecount},
                      {"$filter", filter},
                      {"$orderby", orderby},
                 }
         };
 }
コード例 #2
0
 public CreateRelationship Clone(bool includeLocalProperties)
 {
     var c = new CreateRelationship
             {
                 DestinationEntityId = DestinationEntityId,
                 DestinationEntityType = DestinationEntityType,
                 RelationshipDirection = RelationshipDirection,
                 SourceEntityId = SourceEntityId,
                 SourceEntityType = SourceEntityType,
             };
     CopyExtraPropertiesToClone(c, includeLocalProperties);
     return c;
 }
コード例 #3
0
partial         void CopyExtraPropertiesToClone(CreateRelationship clone, bool includeLocalProperties);
コード例 #4
0
		/// <summary>
        /// Sends a POST to '/api/organisation/{id}/relationshiptype/{key}/relationships'  (asynchronous)
        /// </summary>
        /// <param name="id">a path parameter (no description)</param>
        /// <param name="key">a path parameter (no description)</param>
        /// <param name="model">a body parameter (no description)</param>
        /// <param name="top">a query parameter (Sets the maximum number of results to return)</param>
        /// <param name="skip">a query parameter (Sets the number of results to skip, before return up the $top number of matching items.)</param>
        /// <param name="inlinecount">a query parameter (Determines if the count and total number of results should be included as part of the result set)</param>
        /// <param name="filter">a query parameter (OData filter identifying a subset of results to return.)</param>
        /// <param name="orderby">a query parameter (OData order-by syntax to order results by one or more fields in ascending or descending order.)</param>
        /// <returns></returns>
        public virtual async Task<Relationship> CreateRelationshipAsync(string id, string key, CreateRelationship model, int? top = null, int? skip = null, string inlinecount = null, string filter = null, string orderby = null)
        {
            var operation = Operations.CreateRelationship(id, key, model, top, skip, inlinecount, filter, orderby);
			var response = await _client.SendAsync(operation.BuildRequest(_client));
			EnsureSuccess(response);
			var result = await response.Content.ReadAsAsync<Relationship>();
			return result;
						
		}