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
C#
1
2
3
public Task SaveAsync()
{
}
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
C#
1
2
3
public void Delete()
{
}
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
C#
1
2
3
public Task DeleteAsync()
{
}
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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.
}