DataServiceBasePostResourceT Method

Creates a resource.

Definition

Namespace: Common.Core.Classes
Assembly: Common.Core (in Common.Core.dll) Version: 2.1.5
C#
public T PostResource<T>(
	string uri,
	T obj,
	JsonSerializerOptions? options = null
)
where T : class

Parameters

uri  String
Uniform Resource Identifier.
obj  T
Resource to create.
options  JsonSerializerOptions  (Optional)
Json serializer options.

Type Parameters

T
Generic class or interface.

Return Value

T
The created resource, or if there were errors while processing the JSON.

Exceptions

AggregateExceptionRepresents one or more errors that occur during execution.

See Also