public async Task InvokeAsync( HttpContext context, IContentStorage contentStore, ISchemaStorage schemaStorage, JsonService jsonService) { Guid contentId = Guid.Parse((string)context.GetRouteValue("id")); string schema = (string)context.GetRouteValue("schema"); ContentItem result = await contentStore.GetContentItemAsync(schema, contentId); ContentSchema schemaModel = await schemaStorage.GetContentSchemaAsync(schema); result.ApplySchema(schemaModel); RestContentItem restModel = result.ToRest(); string json = jsonService.Serialize(restModel); await context.Response.WriteAsync(json); }