Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
POST /servicedmcore/CoreIdentity
{
	"Nachnameci_family_name": "Testikus",
	"Vornameci_given_name": "Peter",
	"Activeactive": true,
	"TenantIdtenant_id": 1,
	"CoreIdentityType.Idcore_identity_type.id": 1,
	"AnonymizationStatusanonymization_status.Idid": 1
}

Beispiel-Code

Code Block
languagec#
public async Task CreateCoreIdentity()
{
    	var api = GetService<IApiV2Client>();
    	var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
    	var entityId = await endpoint.CreateAsync(new
    	{
        Nachname 		CiFamilyName = "Testikus",
        Vorname 		CiGivenName = "Peter",
        		TenantId = 1,
        		Active = true,
        		CoreIdentityType = new
        {
            		{
			Id = 1
        		},
        		AnonymizationStatus = new
        {
            		{
			Id = 1
        		}
    	});
}

Mehrere Objekte erstellen

...

Code Block
POST /servicedmcore/CoreIdentity
[
    	{
        "Nachname		"ci_family_name": "TestikusTester",
        "Vorname		"ci_given_name": "Peter",
        "Active		"active": true,
        "TenantId		"tenant_id": 1,
        "CoreIdentityType.Id		"core_identity_type.id": 1,
        "AnonymizationStatus.Id		"anonymization_status.id": 1
    	},
    	{
        "Nachname		"ci_family_name": "TestikusTester",
        "Vorname		"ci_given_name": "Hans",
        "Active		"active": true,
        "TenantId		"tenant_id": 1,
        "CoreIdentityType.Id		"core_identity_type.id": 1,
        "AnonymizationStatus.Id		"anonymization_status.id": 1
    	}
]

Beispiel-Code

Code Block
languagec#
public async Task CreateCoreIdentities()
{
    var api = GetService<IApiV2Client>();
    var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
    var entityIdresults = await endpoint.BatchCreateAsync(new
    {
        Nachname 	{
		CiFamilyName = "TestikusTester",
        Vorname 		CiGivenName = "Peter",
        		TenantId = 1,
        		Active = true,
        		CoreIdentityType = new
        {
            		{
			Id = 1
        		},
        		AnonymizationStatus = new
        {
            		{
			Id = 1
        		}
    	}, new
    	{
        Nachname 		CiFamilyName = "TestikusTester",
        Vorname 		CiGivenName = "Hans",
        		TenantId = 1,
        		Active = true,
        		CoreIdentityType = new
        {
            		{
			Id = 1
        		},
        		AnonymizationStatus = new
        {
            		{
			Id = 1
		}
	});
	var newIds = results.Select(e   }
    }=> e.Id).ToArray();
}

Antwort DataContracts

...