Project methods
Log in to add to favouritesSave
Saves a project instance.
Syntax
public void Save()
{
}
Return value
Type: void
Example
using Zengenti.Contensis.Management;
// Create a client.
var client = ManagementClient.Create();
// Get a specific project.
var project = client.Projects.Get("movieDb");
// Make a change to the project.
project.Description = "Movie database project";
try
{
// Save the changes.
project.Save();
}
catch(RestRequestException restEx)
{
// Handle service error.
}
catch(ValidationException valEx)
{
// Handle data validation errors.
}
catch(Exception ex)
{
// Handle anything else, e.g. network error.
}
SaveAsync
Saves a project instance asynchronously.
Syntax
public Task SaveAsync()
{
}
Return value
Type: Task
Example
using Zengenti.Contensis.Management;
// Create a client.
var client = ManagementClient.Create();
// Get a specific project.
var project = client.Projects.Get("movieDb");
// Make a change to the project.
project.Description = "Movie database project";
try
{
// Save the changes.
await project.SaveAsync();
}
catch(RestRequestException restEx)
{
// Handle service error.
}
catch(ValidationException valEx)
{
// Handle data validation errors.
}
catch(Exception ex)
{
// Handle anything else, e.g. network error.
}
Delete
Deletes a project instance.
Syntax
public void Delete()
{
}
Return value
Type: void
Example
using Zengenti.Contensis.Management;
// Create a client.
var client = ManagementClient.Create();
// Get a specific project.
var project = client.Projects.Get("movieDb");
try
{
// Delete the instance.
project.Delete();
}
catch(RestRequestException restEx)
{
// Handle service error.
}
catch(ValidationException valEx)
{
// Handle data validation errors.
}
catch(Exception ex)
{
// Handle anything else, e.g. network error.
}
DeleteAsync
Deletes a project instance asynchronously.
Syntax
public Task DeleteAsync()
{
}
Return value
Type: Task
Example
using Zengenti.Contensis.Management;
// Create a client.
var client = ManagementClient.Create();
// Get a specific project.
var project = client.Projects.Get("movieDb");
try
{
// Delete the instance.
await project.DeleteAsync();
}
catch(RestRequestException restEx)
{
// Handle service error.
}
catch(ValidationException valEx)
{
// Handle data validation errors.
}
catch(Exception ex)
{
// Handle anything else, e.g. network error.
}