Exemplo n.º 1
0
        public virtual async Task HandleGetEntityAsync(string modelId, string entityContainer, string keyStr)
        {
            var result = await Manager.GetEntityAsync(modelId, entityContainer, keyStr);

            await WriteOkJsonResponseAsync(HttpContext, async jsonWriter => {
                await WriteGetEntityResponseAsync(jsonWriter, result);
            });
        }
Exemplo n.º 2
0
        public virtual async Task HandleGetEntityAsync(string modelId, string entityContainer, string keyStr, CancellationToken ct = default)
        {
            var result = await Manager.GetEntityAsync(modelId, entityContainer, keyStr);

            await WriteOkJsonResponseAsync(HttpContext, async (jsonWriter, cancellationToken) => {
                await WriteGetEntityResponseAsync(jsonWriter, result, cancellationToken);
            }, ct);
        }