Versions Compared

Key

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

...

Code Block
GET /apiv2/servicedmcore/CoreIdentity/3/
?fields=Nachname,Stadt%20%2F%20Ortreadonly_display_name,ci_given_name,ci_family_name

Beispiel-Code

Code Block
languagec#
public class MyCoreIdentityDataContract
{
	public string ReadonlyDisplayName { get; set; }
	public stringAccessDeniedHandler<string> NachnameCiGivenName { get; set; }

   	[JsonProperty("Stadt / Ortci_family_name")]
    	public stringAccessDeniedHandler<string> CityFamilyName { get; set; }
}

public async Task GetCoreIdentityById()
{
    	var api = GetService<IApiV2Client>();
    	var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
	var    MyCoreIdentityDataContract item = await endpoint.GetByIdAsync<MyCoreIdentityDataContract>(3);
}

...

Code Block
GET /apiv2/servicedmcore/CoreIdentity/3/
?fields=Nachnamereadonly_display_name,ci_given_name,ci_family_name

Beispiel-Code

Code Block
languagec#
public async Task GetCoreIdentityById()
{
    	var api = GetService<IApiV2Client>();
    	var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
    	var item = await endpoint.GetByIdAsync(3, new
    	{
        Nachname 		ReadonlyDisplayName = string.Empty,
		CiGivenName = default(AccessDeniedHandler<string>),
		CiFamilyName = default(AccessDeniedHandler<string>)
	});
}

Liste von Objekten via DataContract lesen

...

Code Block
GET /apiv2/servicedmcore/CoreIdentity
?fields=Nachname,Stadt%20%2F%20Ortreadonly_display_name,ci_given_name,ci_family_name

Beispiel-Code

Code Block
languagec#
public class MyCoreIdentityDataContract
{
	public string ReadonlyDisplayName { get; set; }
	public stringAccessDeniedHandler<string> NachnameCiGivenName { get; set; }

   	[JsonProperty("Stadt / Ortci_family_name")]
    	public stringAccessDeniedHandler<string> CityFamilyName { get; set; }
}

public async Task GetCoreIdentityList()
{
    	var api = GetService<IApiV2Client>();
    	var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
    	var listitems = await endpoint.GetListAsync<MyCoreIdentityDataContract>().ToArray();
}

...

Code Block
GET /apiv2/servicedmcore/CoreIdentity
?fields=Nachnamereadonly_display_name,ci_given_name,ci_family_name

Beispiel-Code

Code Block
languagec#
public async Task GetCoreIdentityList()
{
    	var api = GetService<IApiV2Client>();
    	var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
    	var listitems = await endpoint.GetListAsync(new
    	{
        Nachname 		ReadonlyDisplayName = string.Empty,
		CiGivenName = default(AccessDeniedHandler<string>),
		CiFamilyName = default(AccessDeniedHandler<string>)
	}).ToArray();
}

Liste von Objekten via Template-Objekt mit PropertyChains lesen

...

Code Block
GET /apiv2/servicedmcore/CoreIdentity
?fields=Id,Nachname,CoreIdentityType.Idreadonly_display_name,ci_given_name,ci_family_name,core_identity_type.id

Beispiel-Code

Code Block
languagec#
public async Task GetCoreIdentityList()
{
    	var api = GetService<IApiV2Client>();
    	var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
    	var listitems = await endpoint.GetListAsync(new
    {
        Id = 0u,
        	{
		CoreIdentityType = new
        		{
			Id = default(AccessDeniedHandler<uint>)
		},
		ReadonlyDisplayName = string.Empty,
     Id = 0u,
        }
    }		CiGivenName = default(AccessDeniedHandler<string>),
		CiFamilyName = default(AccessDeniedHandler<string>)
	}).ToArray();
}

Liste von Objekten mit Filter

...

Code Block
GET /apiv2/servicedmcore/CoreIdentity
?fields=Nachnamereadonly_display_name,ci_given_name,ci_family_name,core_identity_type.id
&filter=Stadt%20%2F%20Ortci_zip_code eq Aarau5000

Beispiel-Code

Code Block
languagec#
public async Task GetCoreIdentityList()
{
    	var api = GetService<IApiV2Client>();
    	var endpoint = api.DmcoreService.Servicedmcore.CoreIdentity;
    	var listitems = await endpoint.GetListAsync(new
    	{
        Nachname 		ReadonlyDisplayName = string.Empty,
		CiGivenName    }= default(AccessDeniedHandler<string>),
		CiFamilyName = default(AccessDeniedHandler<string>)
	},
	o =>
	{
		o.AddModifier(
			new PropertyFilter
    {
        			{
				FilterType = FilterType.Equals,
        				PropertyName = "Stadt / Ortci_zip_code",
        				Value = "Aarau5000"
			}
   })		);
	}).ToArray();
}