Skip to main content

Get by string id

C#
1
2
3
public Role Get(string roleId) { }

Remarks

Example

C#
1
2
3
4
5
6
7
8
9
using Zengenti.Contensis.Management; var client = ManagementClient.Create(); // Access the movie DB project var project = client.Projects.Get("movieDb"); // Get the role by id var role = project.Security.Roles.Get("fb2f4753-7b4c-4885-b7fe-905377af95ff");

Get by Guid id

C#
1
2
3
public Role Get(Guid roleId) { }

Example

C#
1
2
3
4
5
6
7
8
9
10
11
12
using Zengenti.Contensis.Management; var client = ManagementClient.Create(); // Access the movie DB project var project = client.Projects.Get("movieDb"); // The role id may have been passed in as Guid variable var roleId = Guid.Parse("fb2f4753-7b4c-4885-b7fe-905377af95ff"); // Get the role by id var role = project.Security.Roles.Get(roleId);

Get by string id async

C#
1
2
3
public async Task<Role> GetAsync(string roleId) { }

Example

C#
1
2
3
4
5
6
7
8
9
using Zengenti.Contensis.Management; var client = ManagementClient.Create(); // Access the movie DB project var project = await client.Projects.GetAsync("movieDb"); // Get the role by id var role = await project.Security.Roles.GetAsync("fb2f4753-7b4c-4885-b7fe-905377af95ff");

Get by Guid id async

C#
1
2
3
public async Task<Role> GetAsync(Guid roleId) { }

Example

C#
1
2
3
4
5
6
7
8
9
10
11
12
using Zengenti.Contensis.Management; var client = ManagementClient.Create(); // Access the movie DB project var project = await client.Projects.GetAsync("movieDb"); // The role id may have been passed in as a Guid variable var roleId = Guid.Parse("fb2f4753-7b4c-4885-b7fe-905377af95ff"); // Get the role by id var role = await project.Security.Roles.GetAsync(roleId);

Still need help?

New support request