diff --git a/JsonApiDotnetCore.sln b/JsonApiDotnetCore.sln index 06d0d25651..76349968a2 100644 --- a/JsonApiDotnetCore.sln +++ b/JsonApiDotnetCore.sln @@ -1,4 +1,3 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.28606.126 diff --git a/README.md b/README.md index 5f7a929bb1..d0a5bb2cf2 100644 --- a/README.md +++ b/README.md @@ -91,12 +91,7 @@ Running tests locally requires access to a postgresql database. If you have docker installed, this can be propped up via: ```bash -docker run --rm --name jsonapi-dotnet-core-testing \ - -e POSTGRES_DB=JsonApiDotNetCoreExample \ - -e POSTGRES_USER=postgres \ - -e POSTGRES_PASSWORD=postgres \ - -p 5432:5432 \ - postgres +docker run --rm --name jsonapi-dotnet-core-testing -e POSTGRES_DB=JsonApiDotNetCoreExample -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres ``` And then to run the tests: diff --git a/docs/usage/extensibility/services.md b/docs/usage/extensibility/services.md index 81685a6f36..79fa7d8fb7 100644 --- a/docs/usage/extensibility/services.md +++ b/docs/usage/extensibility/services.md @@ -17,7 +17,7 @@ public class TodoItemService : EntityResourceService public TodoItemService( IJsonApiContext jsonApiContext, - IEntityRepository repository, + IEntityRepository repository, ILoggerFactory loggerFactory, INotificationService notificationService) : base(jsonApiContext, repository, loggerFactory) @@ -25,7 +25,7 @@ public class TodoItemService : EntityResourceService _notificationService = notificationService; } - public override async Task CreateAsync(TEntity entity) + public override async Task CreateAsync(TodoItem entity) { // call the base implementation which uses Entity Framework var newEntity = await base.CreateAsync(entity); diff --git a/docs/usage/resources/hooks.md b/docs/usage/resources/hooks.md new file mode 100644 index 0000000000..8e3f0e9ae8 --- /dev/null +++ b/docs/usage/resources/hooks.md @@ -0,0 +1,680 @@ + + +# Resource Hooks +This section covers the usage of **Resource Hooks**, which is a feature of`ResourceDefinition`. See the [ResourceDefinition usage guide](resource-definitions.md) for a general explanation on how to set up a `ResourceDefinition`. For a quick start, jump right to the [Getting started: most minimal example](#getting-started-most-minimal-example) section. + +By implementing resource hooks on a `ResourceDefintion`, it is possible to intercept the execution of the **Resource Service Layer** (RSL) in various ways. This enables the developer to conveniently define business logic without having to override the RSL. It can be used to implement e.g. +* Authorization +* [Event-based synchronisation between microservices](https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/integration-event-based-microservice-communications) +* Logging +* Transformation of the served data + +This usage guide covers the following sections +1. [**Semantics: pipelines, actions and hooks**](#semantics-pipelines-actions-and-hooks) +Understanding the semantics will be helpful in identifying which hooks on `ResourceDefinition` you need to implement for your use-case. +2. [**Basic usage**](#basic-usage) + Some examples to get you started. + * [**Getting started: most minimal example**](#getting-started-most-minimal-example) + * [**Logging**](#logging) + * [**Transforming data with OnReturn**](#transforming-data-with-onreturn) + * [**Loading database values**](#loading-database-values) +3. [**Advanced usage**](#advanced-usage) + Complicated examples that show the advanced features of hooks. + * [**Simple authorization: explicitly affected resources**](#simple-authorization-explicitly-affected-resources) + * [**Advanced authorization: implicitly affected resources**](#advanced-authorization-implicitly-affected-resources) + * [**Synchronizing data across microservices**](#synchronizing-data-across-microservices) + * [**Hooks for many-to-many join tables**](#hooks-for-many-to-many-join-tables) +5. [**Hook execution overview**](#hook-execution-overview) + A table overview of all pipelines and involved hooks + +# 1. Semantics: pipelines, actions and hooks + +## Pipelines +The different execution flows within the RSL that may be intercepted can be identified as **pipelines**. Examples of such pipelines are +* **Post**: creation of a resource (triggered by the endpoint `POST /my-resource`). +* **PostBulk**: creation of multiple resources (triggered by the endpoint `POST /bulk/my-resource`). + * *NB: hooks are not yet supported with bulk operations.* +* **Get**: reading a resource (triggered by the endpoint `GET /my-resource`). +* **GetSingle**: reading a single resource (triggered by the endpoint `GET /my-resource/1`). + +See the [ResourcePipeline](https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/feat/%23477/src/JsonApiDotNetCore/Hooks/Execution/ResourcePipelineEnum.cs) enum for a full list of available pipelines. + +## Actions +Each pipeline is associated with a set of **actions** that work on resources and their relationships. These actions reflect the associated database operations that is performed by JsonApiDotNetCore (in the Repository Layer). Typically, the RSL will execute some service-layer-related code, then invoke the Repository Layer which will perform these actions, after which the execution returns to the RSL. + +Note that some actions are shared across different pipelines, and note that most pipelines perform multiple actions. There are two types of actions: **main resource actions** and **nested resource actions**. + +### Main resource actions +Most actions are trivial in the context of the pipeline where they're executed from. They may be recognised as the familiar *CRUD* operations of an API. These actions are: + +* The `create` action: the **Post** pipeline will `create` a resource +* The `read` action: the **Get** and **GetSingle** pipeline will `read` (a) resource(s). +* The `update` action: the **Patch** pipeline will `update` a resource. +* The `delete` action: the **Delete** pipeline will `delete` a resource. + +These actions are called the **main resource actions** of a particular pipeline because **they act on the request resource**. For example, when an `Article` is created through the **Post** pipeline, its main action, `create`, will work on that `Article`. + +### Nested Resource Actions +Some other actions might be overlooked, namely the nested resource actions. These actions are + +* `update relationship` for directly affected relationships +* `implicit update relationship` for implicitly affected relationships +* `read` for included relationships + +These actions are called **nested resource actions** of a particular pipeline because **they act on involved (nested) resources** instead of the main request resource. For example, when loading articles and their respective authors (`GET /articles?include=author`), the `read` action on `Article` is the main action, and the `read` action on `Person` is the nested action. + +**The `update relationship` action** +[As per the Json:Api specification](https://jsonapi.org/format/#crud-creating](https://jsonapi.org/format/#crud-creating), the **Post** pipeline also allows for an `update relationship` action on an already existing resource. For example, when creating an `Article` it is possible to simultaneously relate it to an existing `Person` by setting its author. In this case, the `update relationship` action is a nested action that will work on that `Person`. + +**The `implicit update relationship` action** +the **Delete** pipeline also allows for an `implicit update relationship` action on an already existing resource. For example, for an `Article` that its author property assigned to a particular `Person`, the relationship between them is destroyed when this article is deleted. This update is "implicit" in the sense that no explicit information about that `Person` was provided in the request that triggered this pipeline. An `implicit update relationship` action is therefore performed on that `Person`. See [this section](#advanced-authorization-implicitly-affected-resources) for a more detailed. + +### Shared actions +Note that **some actions are shared across pipelines**. For example, both the **Post** and **Patch** pipeline can perform the `update relationship` action on an (already existing) involved resource. Similarly, the **Get** and **GetSingle** pipelines perform the same `read` action. +

+For a complete list of actions associated with each pipeline, see the [overview table](#hook-execution-overview). + +## Hooks +For all actions it is possible to implement **at least one hook** to intercept its execution. These hooks can be implemented by overriding the corresponding virtual implementation on `ResourceDefintion`. (Note that the base implementation is a dummy implementation, which is ignored when firing hooks.) + +### Action related hooks +As an example, consider the `create` action for the `Article` Resource. This action can be intercepted by overriding the +* `ResourceDefintion
.BeforeCreate` hook for custom logic **just before** execution of the main `create` action +* `ResourceDefintion
.AfterCreate` hook for custom logic **just after** execution of the main `create` action + +If with the creation of an `Article` a relationship to `Person` is updated simultaneously, this can be intercepted by overriding the +* `ResourceDefintion.BeforeUpdateRelationship` hook for custom logic **just before** the execution of the nested `update relationship` action. +* `ResourceDefintion.AfterUpdateRelationship` hook for custom logic **just after** the execution of the nested `update relationship` action. + +### OnReturn hook +As mentioned in the previous section, some actions are shared across hooks. One of these actions is the `return` action. Although not strictly compatible with the *CRUD* vocabulary, and although not executed by the Repository Layer, pipelines are also said to perform a `return` action when any content is to be returned from the API. For example, the **Delete** pipeline does not return any content, but a *HTTP 204 No Content* instead, and will therefore not perform a `return` action. On the contrary, the **Get** pipeline does return content, and will therefore perform a `return action` + +Any return content can be intercepted and transformed as desired by implementing the `ResourceDefintion.OnReturn` hook which intercepts the `return` action. For this action, there is no distinction between a `Before` and `After` hook, because no code after a `return` statement can be evaluated. Note that the `return` action can work on *main resources as well as nested resources*, see [this example below](#transforming-data-with-onreturn). +

+For an overview of all pipelines, hooks and actions, see the table below, and for more detailed information about the available hooks, see the [IResourceHookContainer](https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/ab1f96d8255532461da47d290c5440b9e7e6a4a5/src/JsonApiDotNetCore/Hooks/IResourceHookContainer.cs) interface. + +# 2. Basic usage + +## Getting started: most minimal example +To use resource hooks, you are required to turn them on in your `startup.cs` configuration + +```c# +public void ConfigureServices(IServiceCollection services) +{ + ... + services.AddJsonApi( + options => + { + options.EnableResourceHooks = true; // default is false + options.LoadDatabaseValues = false; // default is false + } + ); + ... +} +``` +For this example, we may set `LoadDatabaseValues` to `false`. See the [Loading database values](#loading-database-values) example for more information about this option. + +The simplest case of resource hooks we can then implement should not require a lot of explanation. This hook would triggered by any default JsonApiDotNetCore API route for `Article`. +```c# +public class ArticleResource : ResourceDefinition
+{ + public override IEnumerable
OnReturn(HashSet
entities, ResourcePipeline pipeline) + { + Console.WriteLine("This hook does not do much apart from writing this message" + + " to the console just before serving the content"); + return entities; + } +} +``` +## Logging +This example shows how some actions can be logged on the level of API users. + +First consider the following scoped service which creates a logger bound to a particular user and request. +```c# +/// This is a scoped service, which means wil log will have a request-based +/// unique id associated to it. +public class UserActionsLogger : IUserActionsLogger +{ + public ILogger Instance { get; private set; } + public UserActionsLogger(ILoggerFactory loggerFactory, + IUserService userService) + { + var userId = userService.GetUser().Id; + Instance = loggerFactory.CreateLogger($"[request: {Guid.NewGuid()}" + + "user: {userId}]"); + } +} +``` +Now, let's assume our application has two resources: `Article` and `Person`, and that there exist a one-to-one and one-to-many relationship between them (`Article has one Author` and `Article has many Reviewers`). Let's assume we are required to log the following events +* An API user deletes an article +* An API user removes the `Author` relationship of a person +* An API user removes the `Reviewer` relationship of a person + +This could be achieved in the following way +```c# +/// Note that resource definitions are also registered as scoped services. +public class ArticleResource : ResourceDefinition
+{ + private readonly ILogger _userLogger; + public ArticleResource(IUserActionsLogger logService) + { + _userLogger = logService.Instance; + } + + public override void AfterDelete(HashSet
entities, ResourcePipeline pipeline, bool succeeded) + { + if (!succeeded) return + foreach (Article a in entities) + { + _userLogger.Log(LogLevel.Information, $"Deleted article '{a.Name}' with id {a.Id}"); + } + } +} + +public class PersonResource : ResourceDefinition +{ + private readonly ILogger _userLogger; + public PersonResource(IUserActionsLogger logService) + { + _userLogger = logService.Instance; + } + + public override void AfterUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) + { + var updatedRelationshipsToArticle = relationshipHelper.EntitiesRelatedTo
(); + foreach (var updated in updatedRelationshipsToArticle) + { + RelationshipAttribute relationship = updated.Key; + HashSet affectedEntities = updated.Value; + + foreach (Person p in affectedEntities) + { + if (pipeline == ResourcePipeline.Delete) + { + _userLogger.Log(LogLevel.Information, $"Deleted the {relationship.PublicRelationshipName}" + + "relationship to Article for person '{p.FirstName + p.LastName}' with {p.Id}"); + } + } + } + } +} +``` + +If eg. a API user deletes an article with title *JSON:API paints my bikeshed!* that had related as author *John* and as reviewer *Frank*, the logs generated logs would look something like + +``` +[request: 186190e3-1900-4329-9181-42082258e7b4, user: dd1cd99d-60e9-45ca-8d03-a0330b07bdec] Deleted article 'JSON:API paints my bikeshed!' with id fac0436b-7aa5-488e-9de7-dbe00ff8f04d +[request: 186190e3-1900-4329-9181-42082258e7b4, user: dd1cd99d-60e9-45ca-8d03-a0330b07bdec] Deleted the author relationship to Article for person 'John' with id 2ec3990d-c816-4d6d-8531-7da4a030d4d0 +[request: 186190e3-1900-4329-9181-42082258e7b4, user: dd1cd99d-60e9-45ca-8d03-a0330b07bdec] Deleted the reviewer relationship to Article for person 'Frank' with id 42ad6eb2-b813-4261-8fc1-0db1233e665f +``` +## Transforming data with OnReturn +Using the `OnReturn` hook, any set of resources can be manipulated as desired before serving it from the API. One of the use-cases for this is being able to perform a [filtered included](https://github.com/aspnet/EntityFrameworkCore/issues/1833), which is currently not supported by Entity Framework Core. + +As an example, consider again an application with the `Article` and `Person` resource, and let's assume the following business rules +* when reading `Article`s, we never want to show articles for which the `SoftDeleted` property is set to true. +* when reading `Person`s, we never want to show people who wish to remain anonymous (`Anonymous` is set to true). + +This can be achieved as follows. + +```c# +public class ArticleResource : ResourceDefinition
+{ + public override IEnumerable
OnReturn(HashSet
entities, ResourcePipeline pipeline) + { + return entities.Where(a => a.SoftDeleted == false); + } +} + +public class PersonResource : ResourceDefinition +{ + public override IEnumerable OnReturn(HashSet entities, ResourcePipeline pipeline) + { + if (pipeline == ResourcePipeline.Get) + { + return entities.Where(p => p.Anonymous == false); + } + return entities; + } +} +``` +Note that not only anonymous people will be excluded when directly performing a `GET /people`, but also when included through relationships, like `GET /articles?include=author,reviewers`. Simultaneously, `if` condition that checks for `ResourcePipeline.Get` in the `PersonResource` ensures we still get expected responses from the API when eg. creating a person with `WantsPrivacy` set to true. + +## Loading database values +When a hook is executed for a particular resource, JsonApiDotNetCore can load the corresponding database values and provide them in the hooks. This can be useful for eg. + * having a diff between a previous and new state of a resource (for example when updating a resource) + * performing authorization rules based on the property of a resource. + +For example, consider a scenario in with the following two requirements: +* We need to log all updates on resources revealing their old and new value. +* We need to check if the property `IsLocked` is set is `true`, and if so, cancel the operation. + + Consider an `Article` with title *Hello there* and API user trying to update the the title of this article to *Bye bye*. The above requirements could be implemented as follows +```c# +public class ArticleResource : ResourceDefinition
+{ + private readonly ILogger _logger; + private readonly IJsonApiContext _context; + public constructor ArticleResource(ILogger logger, IJsonApiContext context) + { + _logger = logger; + _context = context; + } + + public override IEnumerable
BeforeUpdate(IResourceDiff
entityDiff, ResourcePipeline pipeline) + { + // PropertyGetter is a helper class that takes care of accessing the values on an instance of Article using reflection. + var getter = new PropertyGetter
(); + + // ResourceDiff is a class that is like a list that contains ResourceDiffPair elements + foreach (ResourceDiffPair
affected in entityDiff) + { + var currentDatabaseState = affected.DatabaseValue; // the current state in the database + var proposedValueFromRequest = affected.Entity; // the value from the request + + if (currentDatabaseState.IsLocked) throw new JsonApiException(403, "Forbidden: this article is locked!") + + foreach (var attr in _context.AttributesToUpdate) + { + var oldValue = getter(currentDatabaseState, attr); + var newValue = getter(proposedValueFromRequest, attr); + + _logger.LogAttributeUpdate(oldValue, newValue) + } + } + // You must return IEnumerable
from this hook. + // This means that you could reduce the set of entities that is + // affected by this request, eg. by entityDiff.Entities.Where( ... ); + entityDiff.Entities; + } +} +``` +In this case the `ResourceDiffPair.DatabaseValue` is `null`. If you try to access all database values at once (`ResourceDiff.DatabaseValues`) when it they are turned off, an exception will be thrown. + +Note that database values are turned on by default. They can be turned of globally by configuring the startup as follows: +```c# +public void ConfigureServices(IServiceCollection services) +{ + ... + services.AddJsonApi( + options => + { + options.LoadDatabaseValues = false; // default is false + } + ); + ... +} +``` + +The global setting can be used together with per-hook configuration hooks using the `LoadDatabaseValues` attribute: +```c# +public class ArticleResource : ResourceDefinition
+{ + [LoadDatabaseValues(true)] + public override IEnumerable
BeforeUpdate(IResourceDiff
entityDiff, ResourcePipeline pipeline) + { + .... + } + + [LoadDatabaseValues(false)] + public override IEnumerable BeforeUpdateRelationships(HashSet ids, IAffectedRelationships
resourcesByRelationship, ResourcePipeline pipeline) + { + // the entities stored in the IAffectedRelationships
instance + // are plain resource identifier objects when LoadDatabaseValues is turned off, + // or objects loaded from the database when LoadDatabaseValues is turned on. + .... + } + } +} +``` + +Note that there are some hooks that the `LoadDatabaseValues` option and attribute does not affect. The only hooks that are affected are: +* `BeforeUpdate` +* `BeforeUpdateRelationship` +* `BeforeDelete` + + + +# 3. Advanced usage + +## Simple authorization: explicitly affected resources +Resource hooks can be used to easily implement authorization in your application. As an example, consider the case in which an API user is not allowed to see anonymous people, which is reflected by the `Anonymous` property on `Person` being set to true`true`. The API should handle this as follows: +* When reading people (`GET /people`), it should hide all people that are set to anonymous. +* When reading a single person (`GET /people/{id}`), it should throw an authorization error if the particular requested person is set to anonymous. + +This can be achieved as follows: +```c# +public class PersonResource : ResourceDefinition +{ + private readonly _IAuthorizationHelper _auth; + public constructor PersonResource(IAuthorizationHelper auth) + { + // IAuthorizationHelper is a helper service that handles all authorization related logic. + _auth = auth; + } + + public override IEnumerable OnReturn(HashSet entities, ResourcePipeline pipeline) + { + if (!_auth.CanSeeSecretPeople()) + { + if (pipeline == ResourcePipeline.GetSingle) + { + throw new JsonApiException(403, "Forbidden to view this person", new UnauthorizedAccessException()); + } + entities = entities.Where( p => !p.IsSecret) + } + return entities; + } +} +``` +This example of authorization is considered simple because it only involves one resource. The next example shows a more complex case + +## Advanced authorization: implicitly affected resources +Let's consider an authorization scenario for which we are required to implement multiple hooks across multiple resource definitions. We will assume the following: +* There exists a one-to-one relationship between `Article` and `Person`: an article can have only one author, and a person can be author of only one article. +* The author of article `Old Article` is person `Alice`. +* The author of article `New Article` is person `Bob`. + +Now let's consider an API user that tries to update `New Article` by setting its author to `Alice`. The request would look something like `PATCH /articles/{NewArticleId}` with a body containing a reference to `Alice`. + +First to all, we wish to authorize this operation by the verifying permissions related to the resources that are **explicity affected** by it: +1. Is the API user allowed to update `New Article`? +2. Is the API user allowed to update `Alice`? + +Apart from this, we also wish to verify permissions for the resources that are **implicitly affected** by this operation: `Bob` and `Old Article`. Setting `Alice` as the new author of `New Article` will result in removing the following two relationships: `Bob` being an author of `New Article`, and `Alice` being an author of `Old Article`. Therefore, we wish wish to verify the related permissions: + +3. Is the API user allowed to update `Bob`? +4. Is the API user allowed to update `Old Article`? + +This authorization requirement can be fulfilled as follows. + +For checking the permissions for the explicitly affected resources, `New Article` and `Alice`, we may implement the `BeforeUpdate` hook for `Article`: +```c# +public override IEnumerable
BeforeUpdate(IResourceDiff
entityDiff, ResourcePipeline pipeline) +{ + if (pipeline == ResourcePipeline.Patch) + { + Article a = entityDiff.RequestEntities.Single(); + if (!_auth.CanEditResource(a)) + { + throw new JsonApiException(403, "Forbidden to update properties of this article", new UnauthorizedAccessException()); + } + if (entityDiff.GetByRelationship().Any() && _auth.CanEditRelationship(a)) + { + throw new JsonApiException(403, "Forbidden to update relationship of this article", new UnauthorizedAccessException()); + } + } + return entityDiff.RequestEntities; +} +``` + + and the `BeforeUpdateRelationship` hook for `Person`: +```c# +public override IEnumerable BeforeUpdateRelationship(HashSet ids, IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) +{ + var updatedOwnerships = resourcesByRelationship.GetByRelationship
(); + if (updatedOwnerships.Any()) + { + Person p = resourcesByRelationship.GetByRelationship
().Single().Value.First(); + if (_auth.CanEditRelationship
(p)) + { + throw new JsonApiException(403, "Forbidden to update relationship of this person", new UnauthorizedAccessException()); + } + } + return ids; +} +``` + +To verify the permissions for the implicitly affected resources, `Old Article` and `Bob`, we need to implement the `BeforeImplicitUpdateRelationship` hook for `Article`: +```c# +public override void BeforeImplicitUpdateRelationship(IAffectedRelationships
resourcesByRelationship, ResourcePipeline pipeline) +{ + var updatedOwnerships = resourcesByRelationship.GetByRelationship(); + if (updatedOwnerships.Any()) + { + Article a = resourcesByRelationship.GetByRelationship().Single().Value.First(); + if (_auth.CanEditRelationship(a)) + { + throw new JsonApiException(403, "Forbidden to update relationship of this article", new UnauthorizedAccessException()); + } + } +} +``` +and similarly for `Person`: +```c# +public override void BeforeImplicitUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) +{ + var updatedOwnerships = resourcesByRelationship.GetByRelationship
(); + if (updatedOwnerships.Any()) + { + Person p = resourcesByRelationship.GetByRelationship
().Single().Value.First(); + if (_auth.CanEditRelationship
(p)) + { + throw new JsonApiException(403, "Forbidden to update relationship of this article", new UnauthorizedAccessException()); + } + } +} +``` + +## Using Resource Hooks without EF Core + +If you want to use Resource Hooks without EF Core, there are several things that you need to consider that need to be met. For any resource that you want to use hooks for: +1. The corresponding resource repository must fully implement `IEntityReadRepository` +2. If you are using custom services, you will be responsible for injecting the `IResourceHookExecutor` service into your services and call the appropriate methods. See the [hook execution overview](#hook-execution-overview) to determine which hook should be fired in which scenario. + +If you are required to use the `BeforeImplicitUpdateRelationship` hook (see previous example), there is an additional requirement. For this hook, given a particular relationship, JsonApiDotNetCore needs to be able to resolve the inverse relationship. For example: if `Article` has one author (a `Person`), then it needs to be able to resolve the `RelationshipAttribute` that corresponds to the inverse relationship for the `author` property. There are two approaches : + +1. **Tell JsonApiDotNetCore how to do this only for the relevant models**. If you're using the `BeforeImplicitUpdateRelationship` hook only for a small set of models, eg only for the relationship of the example, then it is easiest to provide the `inverseNavigationProperty` as follows: +```c# +public class Article : Identifiable +{ + ... + [HasOne("author", inverseNavigationProperty: "OwnerOfArticle")] + public virtual Person Author { get; set; } + ... +} +public class Person : Identifiable +{ + ... + [HasOne("article")] + public virtual Article OwnerOfArticle { get; set; } + ... +} +``` +2. **Tell JsonApiDotNetCore how to do this in general**. For full support, you can provide JsonApiDotNetCore with a custom service implementation of the `IInverseRelationships` interface. relationship of the example, then it is easiest to provide the `inverseNavigationProperty` as follows: +```c# +public class CustomInverseRelationshipsResolver : IInverseRelationships +{ + public void Resolve() + { + // the implementation of this method depends completely + // the data access layer you're using. + // It should set the RelationshipAttribute.InverseRelationship property + // for all (relevant) relationships. + // To have an idea of how to implement this method, see the InverseRelationships class + // in the source code of JADNC: + // https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/59a93590ac4f05c9c246eca9459b49e331250805/src/JsonApiDotNetCore/Internal/InverseRelationships.cs + } +} +``` +This service will then be called run once at startup and take care of the metadata that is required for `BeforeImplicitUpdateRelationship` to be supported. + +*Note: don't forget to register this singleton service with the service provider.* + + + +## Synchronizing data across microservices +If your application is built using a microservices infrastructure, it may be relevant to propagate data changes between microservices, [see this article for more information](https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/integration-event-based-microservice-communications). In this example, we will assume the implementation of an event bus and we will publish data consistency integration events using resource hooks. + +```c# +public class ArticleResource : ResourceDefinition
+{ + private readonly IEventBus _bus; + private readonly IJsonApiContext _context; + public ArticleResource(IEventBus bus, IJsonApiContext context) + { + _bus = bus; + _context = context; + } + public override void AfterCreate(HashSet
entities, ResourcePipeline pipeline) + { + foreach (var article in entities ) + { + var @event = new ResourceCreatedEvent(article); + _bus.Publish(@event); + } + } + + public override void AfterDelete(HashSet
entities, ResourcePipeline pipeline, bool succeeded) + { + foreach (var article in entities) + { + var @event = new ResourceDeletedEvent(article); + _bus.Publish(@event); + } + } + + public override void AfterUpdate(HashSet
entities, ResourcePipeline pipeline) + { + foreach (var article in entities) + { + // You could inject IJsonApiContext and use it to pass along only the attributes that were updated + var @event = new ResourceUpdatedEvent(article, properties: _context.AttributesToUpdate); + _bus.Publish(@event); + } + } +} +``` + +## Hooks for many-to-many join tables +In this example we consider an application with a many-to-many relationships: `Article` and `Tag`, with an internally used `ArticleTag` throughtype. + +Usually, join table records will not contain any extra information other than that which is used internally for the many-to-many relationship. For this example, the throughtype should then look like: +```c# +public class ArticleTag +{ + public int ArticleId { get; set; } + public Article Article { get; set; } + public int TagId { get; set; } + public Tag Tag { get; set; } +} +``` +If we then eg. implement the `AfterRead` and `OnReturn` hook for `Article` and `Tag`, and perform a `GET /articles?include=tags` request, we may expect the following order of execution: + +1. Article AfterRead +2. Tag AfterRead +3. Article OnReturn +4. Tag OnReturn + +Note that under the hood, the *join table records* (instances of `ArticleTag`) are also being read, but we did not implement any hooks for them. In this example, for these records, there is little relevant business logic that can be thought of. + +Sometimes, however, relevant data may be stored in the join table of a many-to-many relationship. Let's imagine we wish to add a property `LinkDate` to the join table that reflects when a tag was added to an article. In this case, we may want to execute business logic related to these records: we may for example want to hide any tags that were added to an article longer than 2 weeks ago. + +In order to achieve this, we need to change `ArticleTag` to `ArticleTagWithLinkDate` as follows: +```c# +public class ArticleTagWithLinkDate : Identifiable +{ + public int ArticleId { get; set; } + [HasOne("Article")] + public Article Article { get; set; } + public int TagId { get; set; } + [HasOne("Tag")] + public Tag Tag { get; set; } + public DateTime LinkDate { get; set; } +} +``` +Then, we may implement a hook for `ArticleTagWithLinkDate` as usual: +```c# +public class ArticleTagWithLinkDateResource : ResourceDefinition +{ + public override IEnumerable OnReturn(HashSet entities, ResourcePipeline pipeline) + { + return entities.Where(e => (DateTime.Now - e.LinkDate) < 14); + } +} +``` +Then, for the same request `GET /articles?include=tags`, the order of execution of the hooks will look like: +1. Article AfterRead +2. Tag AfterRead +3. Article OnReturn +4. ArticleTagWithLinkDate OnReturn +5. Tag OnReturn + +And the included collection of tags per article will only contain tags that were added less than two weeks ago. + +Note that the introduced inheritance and added relationship attributes does not further affect the many-to-many relationship internally. + +# 4. Hook execution overview + + +This table below shows the involved hooks per pipeline. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PipelineExecution Flow
Before HooksRepository ActionsAfter HooksOnReturn
GetBeforeReadreadAfterRead
GetSingleBeforeReadAfterRead
GetRelationshipBeforeReadAfterRead
PostBeforeCreatecreate
update relationship
AfterCreate
PatchBeforeUpdate
BeforeUpdateRelationship
BeforeImplicitUpdateRelationship
update
update relationship
implicit update relationship
AfterUpdate
AfterUpdateRelationship
PatchRelationshipBeforeUpdate
BeforeUpdateRelationship
update
update relationship
implicit update relationship
AfterUpdate
AfterUpdateRelationship
DeleteBeforeDeletedelete
implicit update relationship
AfterDelete
BulkPostNot yet supported
BulkPatchNot yet supported
BulkDeleteNot yet supported
diff --git a/src/Examples/GettingStarted/Properties/launchSettings.json b/src/Examples/GettingStarted/Properties/launchSettings.json new file mode 100644 index 0000000000..7dc07f5b4f --- /dev/null +++ b/src/Examples/GettingStarted/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:56042/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "GettingStarted": { + "commandName": "Project", + "launchBrowser": true + } + } +} diff --git a/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs b/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs index fc41350664..e9581fc401 100644 --- a/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs +++ b/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs @@ -1,10 +1,15 @@ using System.Collections.Generic; +using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Models; namespace GettingStarted.ResourceDefinitionExample { public class ModelDefinition : ResourceDefinition { + public ModelDefinition(IResourceGraph graph) : base(graph) + { + } + // this allows POST / PATCH requests to set the value of a // property, but we don't include this value in the response // this might be used if the incoming value gets hashed or diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs new file mode 100644 index 0000000000..28a47eb419 --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs @@ -0,0 +1,15 @@ +using JsonApiDotNetCore.Controllers; +using JsonApiDotNetCore.Services; +using JsonApiDotNetCoreExample.Models; + +namespace JsonApiDotNetCoreExample.Controllers +{ + public class PassportsController : JsonApiController + { + public PassportsController( + IJsonApiContext jsonApiContext, + IResourceService resourceService) + : base(jsonApiContext, resourceService) + { } + } +} \ No newline at end of file diff --git a/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs b/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs index b6609eb0dc..b333e88536 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs @@ -41,19 +41,46 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity() .HasKey(bc => new { bc.ArticleId, bc.TagId }); + modelBuilder.Entity() + .HasKey(bc => new { bc.ArticleId, bc.TagId }); + + modelBuilder.Entity() + .HasOne(t => t.StakeHolderTodo) + .WithMany(t => t.StakeHolders) + .HasForeignKey(t => t.StakeHolderTodoId) + .OnDelete(DeleteBehavior.Cascade); modelBuilder.Entity() .HasOne(t => t.DependentTodoItem); - + modelBuilder.Entity() .HasMany(t => t.ChildrenTodoItems) .WithOne(t => t.ParentTodoItem) .HasForeignKey(t => t.ParentTodoItemId); + modelBuilder.Entity() + .HasOne(p => p.Passport) + .WithOne(p => p.Person) + .HasForeignKey(p => p.PassportId); + + modelBuilder.Entity() + .HasOne(p => p.Person) + .WithOne(p => p.Passport) + .HasForeignKey(p => p.PassportId); + modelBuilder.Entity() + .HasOne(p => p.ToOnePerson) + .WithOne(p => p.ToOneTodoItem) + .HasForeignKey(p => p.ToOnePersonId); + + modelBuilder.Entity() + .HasOne(p => p.ToOneTodoItem) + .WithOne(p => p.ToOnePerson) + .HasForeignKey(p => p.ToOnePersonId); } public DbSet TodoItems { get; set; } + public DbSet Passports { get; set; } public DbSet People { get; set; } public DbSet TodoItemCollections { get; set; } public DbSet CamelCasedModels { get; set; } @@ -61,13 +88,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public DbSet Authors { get; set; } public DbSet NonJsonApiResources { get; set; } public DbSet Users { get; set; } - public DbSet Courses { get; set; } public DbSet Departments { get; set; } public DbSet Registrations { get; set; } public DbSet Students { get; set; } public DbSet PersonRoles { get; set; } public DbSet ArticleTags { get; set; } + public DbSet IdentifiableArticleTags { get; set; } public DbSet Tags { get; set; } } } diff --git a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj old mode 100755 new mode 100644 diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/Article.cs b/src/Examples/JsonApiDotNetCoreExample/Models/Article.cs index 8d4d310f70..6b4648e8d2 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Models/Article.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Models/Article.cs @@ -17,5 +17,11 @@ public class Article : Identifiable [HasManyThrough(nameof(ArticleTags))] public List Tags { get; set; } public List ArticleTags { get; set; } + + + [NotMapped] + [HasManyThrough(nameof(IdentifiableArticleTags))] + public List IdentifiableTags { get; set; } + public List IdentifiableArticleTags { get; set; } } } diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs b/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs index 992e688c51..8b180cc203 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs @@ -1,3 +1,5 @@ +using JsonApiDotNetCore.Models; + namespace JsonApiDotNetCoreExample.Models { public class ArticleTag @@ -8,4 +10,18 @@ public class ArticleTag public int TagId { get; set; } public Tag Tag { get; set; } } + + + public class IdentifiableArticleTag : Identifiable + { + public int ArticleId { get; set; } + [HasOne("article")] + public Article Article { get; set; } + + public int TagId { get; set; } + [HasOne("Tag")] + public Tag Tag { get; set; } + + public string SomeMetaData { get; set; } + } } \ No newline at end of file diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/Author.cs b/src/Examples/JsonApiDotNetCoreExample/Models/Author.cs index c77ad007c8..246118a53b 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Models/Author.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Models/Author.cs @@ -12,3 +12,4 @@ public class Author : Identifiable public List
Articles { get; set; } } } + diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/IIsLockable.cs b/src/Examples/JsonApiDotNetCoreExample/Models/IIsLockable.cs new file mode 100644 index 0000000000..fe7d07ad34 --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Models/IIsLockable.cs @@ -0,0 +1,7 @@ +namespace JsonApiDotNetCoreExample.Models +{ + public interface IIsLockable + { + bool IsLocked { get; set; } + } +} \ No newline at end of file diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs b/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs index 7586b67674..ebcfb8b09f 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs @@ -5,6 +5,8 @@ namespace JsonApiDotNetCoreExample.Models public class Passport : Identifiable { public virtual int? SocialSecurityNumber { get; set; } + public virtual bool IsLocked { get; set; } + [HasOne("person")] public virtual Person Person { get; set; } } diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs b/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs index 63eea72cb0..3b3d44a8e2 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs @@ -11,8 +11,10 @@ public class PersonRole : Identifiable public Person Person { get; set; } } - public class Person : Identifiable, IHasMeta + public class Person : Identifiable, IHasMeta, IIsLockable { + public bool IsLocked { get; set; } + [Attr("first-name")] public string FirstName { get; set; } @@ -32,12 +34,25 @@ public class Person : Identifiable, IHasMeta public virtual List TodoItemCollections { get; set; } [HasOne("role")] - public virtual PersonRole Role { get; set; } + public virtual PersonRole Role { get; set; } public int? PersonRoleId { get; set; } + [HasOne("one-to-one-todo-item")] + public virtual TodoItem ToOneTodoItem { get; set; } + + + [HasOne("stake-holder-todo-item")] + public virtual TodoItem StakeHolderTodo { get; set; } + public virtual int? StakeHolderTodoId { get; set; } + [HasOne("unincludeable-item", documentLinks: Link.All, canInclude: false)] public virtual TodoItem UnIncludeableItem { get; set; } + public int? PassportId { get; set; } + + [HasOne("passport")] + public virtual Passport Passport { get; set; } + public Dictionary GetMeta(IJsonApiContext context) { return new Dictionary { @@ -45,9 +60,6 @@ public Dictionary GetMeta(IJsonApiContext context) { "authors", new string[] { "Jared Nance" } } }; } - public int? PassportId { get; set; } - [HasOne("passport")] - public virtual Passport Passport { get; set; } } } diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs b/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs index b7b84ad780..4576595d91 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs @@ -4,13 +4,15 @@ namespace JsonApiDotNetCoreExample.Models { - public class TodoItem : Identifiable + public class TodoItem : Identifiable, IIsLockable { public TodoItem() { GuidProperty = Guid.NewGuid(); } + public bool IsLocked { get; set; } + [Attr("description")] public string Description { get; set; } @@ -48,17 +50,25 @@ public string CalculatedValue [HasOne("assignee")] public virtual Person Assignee { get; set; } + [HasOne("one-to-one-person")] + public virtual Person ToOnePerson { get; set; } + public virtual int? ToOnePersonId { get; set; } + + + [HasMany("stake-holders")] + public virtual List StakeHolders { get; set; } + [HasOne("collection")] public virtual TodoItemCollection Collection { get; set; } + + // cyclical to-one structure public virtual int? DependentTodoItemId { get; set; } [HasOne("dependent-on-todo")] public virtual TodoItem DependentTodoItem { get; set; } - - - // cyclical structure + // cyclical to-many structure public virtual int? ParentTodoItemId {get; set;} [HasOne("parent-todo")] public virtual TodoItem ParentTodoItem { get; set; } diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/ArticleResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/ArticleResource.cs new file mode 100644 index 0000000000..66429f175c --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Resources/ArticleResource.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Linq; +using System; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Microsoft.Extensions.Logging; +using System.Security.Principal; + +namespace JsonApiDotNetCoreExample.Resources +{ + public class ArticleResource : ResourceDefinition
+ { + public ArticleResource(IResourceGraph graph) : base(graph) { } + + public override IEnumerable
OnReturn(HashSet
entities, ResourcePipeline pipeline) + { + if (pipeline == ResourcePipeline.GetSingle && entities.Single().Name == "Classified") + { + throw new JsonApiException(403, "You are not allowed to see this article!", new UnauthorizedAccessException()); + } + return entities.Where(t => t.Name != "This should be not be included"); + } + } +} + diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/LockableResourceBase.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/LockableResourceBase.cs new file mode 100644 index 0000000000..7e2ce4f658 --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Resources/LockableResourceBase.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCoreExample.Models; + +namespace JsonApiDotNetCoreExample.Resources +{ + public abstract class LockableResourceBase : ResourceDefinition where T : class, IIsLockable, IIdentifiable + { + protected LockableResourceBase(IResourceGraph graph) : base(graph) { } + + protected void DisallowLocked(IEnumerable entities) + { + foreach (var e in entities ?? Enumerable.Empty()) + { + if (e.IsLocked) + { + throw new JsonApiException(403, "Not allowed to update fields or relations of locked todo item", new UnauthorizedAccessException()); + } + } + } + } +} diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/PassportResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/PassportResource.cs new file mode 100644 index 0000000000..b1a86bf4b8 --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Resources/PassportResource.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; + +namespace JsonApiDotNetCoreExample.Resources +{ + public class PassportResource : ResourceDefinition + { + public PassportResource(IResourceGraph graph) : base(graph) + { + } + + public override void BeforeRead(ResourcePipeline pipeline, bool isIncluded = false, string stringId = null) + { + if (pipeline == ResourcePipeline.GetSingle && isIncluded) + { + throw new JsonApiException(403, "Not allowed to include passports on individual people", new UnauthorizedAccessException()); + } + } + + public override void BeforeImplicitUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) + { + resourcesByRelationship.GetByRelationship().ToList().ForEach(kvp => DoesNotTouchLockedPassports(kvp.Value)); + } + + private void DoesNotTouchLockedPassports(IEnumerable entities) + { + foreach (var entity in entities ?? Enumerable.Empty()) + { + if (entity.IsLocked) + { + throw new JsonApiException(403, "Not allowed to update fields or relations of locked persons", new UnauthorizedAccessException()); + } + } + } + } +} diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/PersonResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/PersonResource.cs new file mode 100644 index 0000000000..50e9efb54c --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Resources/PersonResource.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; + +namespace JsonApiDotNetCoreExample.Resources +{ + public class PersonResource : LockableResourceBase + { + public PersonResource(IResourceGraph graph) : base(graph) { } + + public override IEnumerable BeforeUpdateRelationship(HashSet ids, IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) + { + BeforeImplicitUpdateRelationship(resourcesByRelationship, pipeline); + return ids; + } + + //[LoadDatabaseValues(true)] + //public override IEnumerable BeforeUpdate(IResourceDiff entityDiff, ResourcePipeline pipeline) + //{ + // return entityDiff.Entities; + //} + + public override void BeforeImplicitUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) + { + resourcesByRelationship.GetByRelationship().ToList().ForEach(kvp => DisallowLocked(kvp.Value)); + } + } +} diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/TagResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/TagResource.cs new file mode 100644 index 0000000000..99769feade --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Resources/TagResource.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using JsonApiDotNetCore.Internal; + +namespace JsonApiDotNetCoreExample.Resources +{ + public class TagResource : ResourceDefinition + { + public TagResource(IResourceGraph graph) : base(graph) + { + } + + public override IEnumerable OnReturn(HashSet entities, ResourcePipeline pipeline) + { + return entities.Where(t => t.Name != "This should be not be included"); + } + } +} diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/TodoResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/TodoResource.cs new file mode 100644 index 0000000000..1de3a02a6a --- /dev/null +++ b/src/Examples/JsonApiDotNetCoreExample/Resources/TodoResource.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; + +namespace JsonApiDotNetCoreExample.Resources +{ + public class TodoResource : LockableResourceBase + { + public TodoResource(IResourceGraph graph) : base(graph) { } + + public override void BeforeRead(ResourcePipeline pipeline, bool isIncluded = false, string stringId = null) + { + if (stringId == "1337") + { + throw new JsonApiException(403, "Not allowed to update author of any TodoItem", new UnauthorizedAccessException()); + } + } + + public override void BeforeImplicitUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) + { + List todos = resourcesByRelationship.GetByRelationship().SelectMany(kvp => kvp.Value).ToList(); + DisallowLocked(todos); + } + } +} diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs index 0f9c473d17..ec54b6144e 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs @@ -3,11 +3,14 @@ using JsonApiDotNetCore.Models; using JsonApiDotNetCoreExample.Models; using JsonApiDotNetCore.Internal.Query; +using JsonApiDotNetCore.Internal; namespace JsonApiDotNetCoreExample.Resources { public class UserResource : ResourceDefinition { + public UserResource(IResourceGraph graph) : base(graph) { } + protected override List OutputAttrs() => Remove(user => user.Password); diff --git a/src/Examples/JsonApiDotNetCoreExample/Startup.cs b/src/Examples/JsonApiDotNetCoreExample/Startup.cs index cd87d804c5..44784f7eac 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Startup.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Startup.cs @@ -39,6 +39,8 @@ public virtual IServiceProvider ConfigureServices(IServiceCollection services) options.Namespace = "api/v1"; options.DefaultPageSize = 5; options.IncludeTotalRecordCount = true; + options.EnableResourceHooks = true; + options.LoadDatabaseValues = true; }, mvcBuilder, discovery => discovery.AddCurrentAssembly()); diff --git a/src/Examples/NoEntityFrameworkExample/Services/TodoItemService.cs b/src/Examples/NoEntityFrameworkExample/Services/TodoItemService.cs index d43007400c..f68c056829 100644 --- a/src/Examples/NoEntityFrameworkExample/Services/TodoItemService.cs +++ b/src/Examples/NoEntityFrameworkExample/Services/TodoItemService.cs @@ -68,8 +68,8 @@ public async Task CreateAsync(TodoItem entity) { return (await QueryAsync(async connection => { - var query = "insert into \"TodoItems\" (\"Description\", \"Ordinal\", \"GuidProperty\") values (@description, @ordinal, @guidProperty) returning \"Id\",\"Description\",\"Ordinal\", \"GuidProperty\""; - var result = await connection.QueryAsync(query, new { description = entity.Description, ordinal = entity.Ordinal, guidProperty = entity.GuidProperty}); + var query = "insert into \"TodoItems\" (\"Description\", \"IsLocked\", \"Ordinal\", \"GuidProperty\") values (@description, @isLocked, @ordinal, @guidProperty) returning \"Id\",\"Description\", \"IsLocked\", \"Ordinal\", \"GuidProperty\""; + var result = await connection.QueryAsync(query, new { description = entity.Description, ordinal = entity.Ordinal, guidProperty = entity.GuidProperty, isLocked = entity.IsLocked}); return result; })).SingleOrDefault(); } diff --git a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs index f17d20f4a2..dfa6b665a0 100644 --- a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs @@ -179,7 +179,8 @@ protected virtual List GetRelationships(Type entityType) attribute.PublicRelationshipName = attribute.PublicRelationshipName ?? JsonApiOptions.ResourceNameFormatter.FormatPropertyName(prop); attribute.InternalRelationshipName = prop.Name; - attribute.Type = GetRelationshipType(attribute, prop); + attribute.DependentType = GetRelationshipType(attribute, prop); + attribute.PrincipalType = entityType; attributes.Add(attribute); if (attribute is HasManyThroughAttribute hasManyThroughAttribute) { @@ -212,13 +213,13 @@ protected virtual List GetRelationships(Type entityType) ?? throw new JsonApiSetupException($"{hasManyThroughAttribute.ThroughType} does not contain a relationship id property to type {entityType} with name {leftIdPropertyName}"); // Article → ArticleTag.Tag - hasManyThroughAttribute.RightProperty = throughProperties.SingleOrDefault(x => x.PropertyType == hasManyThroughAttribute.Type) - ?? throw new JsonApiSetupException($"{hasManyThroughAttribute.ThroughType} does not contain a navigation property to type {hasManyThroughAttribute.Type}"); + hasManyThroughAttribute.RightProperty = throughProperties.SingleOrDefault(x => x.PropertyType == hasManyThroughAttribute.DependentType) + ?? throw new JsonApiSetupException($"{hasManyThroughAttribute.ThroughType} does not contain a navigation property to type {hasManyThroughAttribute.DependentType}"); // ArticleTag.TagId var rightIdPropertyName = JsonApiOptions.RelatedIdMapper.GetRelatedIdPropertyName(hasManyThroughAttribute.RightProperty.Name); hasManyThroughAttribute.RightIdProperty = throughProperties.SingleOrDefault(x => x.Name == rightIdPropertyName) - ?? throw new JsonApiSetupException($"{hasManyThroughAttribute.ThroughType} does not contain a relationship id property to type {hasManyThroughAttribute.Type} with name {rightIdPropertyName}"); + ?? throw new JsonApiSetupException($"{hasManyThroughAttribute.ThroughType} does not contain a relationship id property to type {hasManyThroughAttribute.DependentType} with name {rightIdPropertyName}"); } } diff --git a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs index 48464923d2..ad52aeb8bb 100644 --- a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs @@ -249,7 +249,7 @@ private List IncludeSingleResourceRelationships( { if (relationshipChainIndex < relationshipChain.Length) { - var nextContextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(relationship.Type); + var nextContextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(relationship.DependentType); var resource = (IIdentifiable)navigationEntity; // recursive call if (relationshipChainIndex < relationshipChain.Length - 1) @@ -340,7 +340,7 @@ private ResourceIdentifierObject GetIndependentRelationshipIdentifier(HasOneAttr if (independentRelationshipIdentifier == null) return null; - var relatedContextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(hasOne.Type); + var relatedContextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(hasOne.DependentType); if (relatedContextEntity == null) // TODO: this should probably be a debug log at minimum return null; diff --git a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs index e8e7d83be8..906ee4fba8 100644 --- a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs +++ b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs @@ -16,6 +16,7 @@ namespace JsonApiDotNetCore.Configuration /// public class JsonApiOptions { + /// /// Provides an interface for formatting resource names by convention /// @@ -36,6 +37,21 @@ public class JsonApiOptions /// public static bool DisableErrorSource { get; set; } + /// + /// Whether or not ResourceHooks are enabled. + /// + /// Default is set to for backward compatibility. + /// + public bool EnableResourceHooks { get; set; } = false; + + /// + /// Whether or not database values should be included by default + /// for resource hooks. Ignored if EnableResourceHooks is set false. + /// + /// Defaults to . + /// + public bool LoadDatabaseValues { get; set; } = false; + /// /// The base URL Namespace /// diff --git a/src/JsonApiDotNetCore/Data/Article.cs b/src/JsonApiDotNetCore/Data/Article.cs new file mode 100644 index 0000000000..004d5d2f71 --- /dev/null +++ b/src/JsonApiDotNetCore/Data/Article.cs @@ -0,0 +1,4 @@ +namespace JsonApiDotNetCore.Data +{ + +} diff --git a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs index c5fa47b6ab..dabf447efe 100644 --- a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs +++ b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs @@ -208,14 +208,13 @@ private void LoadInverseRelationships(object trackedRelationshipValue, Relations private bool IsHasOneRelationship(string internalRelationshipName, Type type) { var relationshipAttr = _jsonApiContext.ResourceGraph.GetContextEntity(type).Relationships.SingleOrDefault(r => r.InternalRelationshipName == internalRelationshipName); - if (relationshipAttr != null) + if(relationshipAttr != null) { if (relationshipAttr is HasOneAttribute) return true; return false; - } - else + } else { - // relationshipAttr is null when there is not put a [RelationshipAttribute] on the inverse navigation property. + // relationshipAttr is null when we don't put a [RelationshipAttribute] on the inverse navigation property. // In this case we use relfection to figure out what kind of relationship is pointing back. return !(type.GetProperty(internalRelationshipName).PropertyType.Inherits(typeof(IEnumerable))); } @@ -419,7 +418,9 @@ public virtual async Task> PageAsync(IQueryable en { if (pageNumber >= 0) { - return await entities.PageForward(pageSize, pageNumber).ToListAsync(); + // the IQueryable returned from the hook executor is sometimes consumed here. + // In this case, it does not support .ToListAsync(), so we use the method below. + return await this.ToListAsync(entities.PageForward(pageSize, pageNumber)); } // since EntityFramework does not support IQueryable.Reverse(), we need to know the number of queried entities @@ -428,11 +429,10 @@ public virtual async Task> PageAsync(IQueryable en // may be negative int virtualFirstIndex = numberOfEntities - pageSize * Math.Abs(pageNumber); int numberOfElementsInPage = Math.Min(pageSize, virtualFirstIndex + pageSize); - - return await entities + + return await ToListAsync(entities .Skip(virtualFirstIndex) - .Take(numberOfElementsInPage) - .ToListAsync(); + .Take(numberOfElementsInPage)); } /// diff --git a/src/JsonApiDotNetCore/Data/IEntityReadRepository.cs b/src/JsonApiDotNetCore/Data/IEntityReadRepository.cs index 74e147cc55..bcbcdb9f8e 100644 --- a/src/JsonApiDotNetCore/Data/IEntityReadRepository.cs +++ b/src/JsonApiDotNetCore/Data/IEntityReadRepository.cs @@ -24,7 +24,7 @@ public interface IEntityReadRepository /// /// Apply fields to the provided queryable /// - IQueryable Select(IQueryable entities,List fields); + IQueryable Select(IQueryable entities, List fields); /// /// Include a relationship in the query diff --git a/src/JsonApiDotNetCore/Data/IEntityRepository.cs b/src/JsonApiDotNetCore/Data/IEntityRepository.cs index ac69f4fdac..d4e8870341 100644 --- a/src/JsonApiDotNetCore/Data/IEntityRepository.cs +++ b/src/JsonApiDotNetCore/Data/IEntityRepository.cs @@ -1,7 +1,9 @@ +using System; using JsonApiDotNetCore.Models; namespace JsonApiDotNetCore.Data { + public interface IEntityRepository : IEntityRepository where TEntity : class, IIdentifiable @@ -33,4 +35,7 @@ internal interface IEntityFrameworkRepository /// void DetachRelationshipPointers(TEntity entity); } + } + + diff --git a/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs b/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs index af33e883a6..8407ede0d3 100644 --- a/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs @@ -236,6 +236,14 @@ private static IQueryable CallGenericWhereContainsMethod(IQuer } } + /// + /// This calls a generic where method.. more explaining to follow + /// + /// + /// + /// + /// + /// private static IQueryable CallGenericWhereMethod(IQueryable source, BaseFilterQuery filter) { var op = filter.FilterOperation; @@ -254,7 +262,7 @@ private static IQueryable CallGenericWhereMethod(IQueryable PageForward(this IQueryable source, int pageSi return source; } + public static void ForEach(this IEnumerable enumeration, Action action) + { + foreach (T item in enumeration) + { + action(item); + } + } + } } diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index a44020ae5b..6c3779cbb3 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -13,12 +12,12 @@ using JsonApiDotNetCore.Middleware; using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Serialization; +using JsonApiDotNetCore.Hooks; using JsonApiDotNetCore.Services; using JsonApiDotNetCore.Services.Operations; using JsonApiDotNetCore.Services.Operations.Processors; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; @@ -115,6 +114,11 @@ public static void AddJsonApiInternals( services.AddScoped(typeof(IEntityRepository<>), typeof(DefaultEntityRepository<>)); services.AddScoped(typeof(IEntityRepository<,>), typeof(DefaultEntityRepository<,>)); + services.AddScoped(typeof(IEntityReadRepository<,>), typeof(DefaultEntityRepository<,>)); + services.AddScoped(typeof(IEntityWriteRepository<,>), typeof(DefaultEntityRepository<,>)); + + + services.AddScoped(typeof(ICreateService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(ICreateService<,>), typeof(EntityResourceService<,>)); @@ -155,10 +159,17 @@ public static void AddJsonApiInternals( services.AddScoped(); services.AddScoped(); - services.AddScoped(); + + if (jsonApiOptions.EnableResourceHooks) + { + services.AddSingleton(typeof(IHooksDiscovery<>), typeof(HooksDiscovery<>)); + services.AddScoped(typeof(IResourceHookContainer<>), typeof(ResourceDefinition<>)); + services.AddTransient(typeof(IResourceHookExecutor), typeof(ResourceHookExecutor)); + services.AddTransient(); + } + services.AddScoped(); - // services.AddScoped(); } private static void AddOperationServices(IServiceCollection services) diff --git a/src/JsonApiDotNetCore/Extensions/TypeExtensions.cs b/src/JsonApiDotNetCore/Extensions/TypeExtensions.cs index 9ebc942b03..ee79174529 100644 --- a/src/JsonApiDotNetCore/Extensions/TypeExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/TypeExtensions.cs @@ -8,6 +8,7 @@ namespace JsonApiDotNetCore.Extensions { internal static class TypeExtensions { + /// /// Extension to use the LINQ AddRange method on an IList /// @@ -28,8 +29,7 @@ public static void AddRange(this IList list, IEnumerable items) } } } - - + /// /// Extension to use the LINQ cast method in a non-generic way: /// diff --git a/src/JsonApiDotNetCore/Graph/TypeLocator.cs b/src/JsonApiDotNetCore/Graph/TypeLocator.cs index f96e17ffe0..610b813428 100644 --- a/src/JsonApiDotNetCore/Graph/TypeLocator.cs +++ b/src/JsonApiDotNetCore/Graph/TypeLocator.cs @@ -9,7 +9,7 @@ namespace JsonApiDotNetCore.Graph /// /// Used to locate types and facilitate auto-resource discovery /// - internal static class TypeLocator + static class TypeLocator { private static Dictionary _typeCache = new Dictionary(); private static Dictionary> _identifiableTypeCache = new Dictionary>(); diff --git a/src/JsonApiDotNetCore/Hooks/Discovery/HooksDiscovery.cs b/src/JsonApiDotNetCore/Hooks/Discovery/HooksDiscovery.cs new file mode 100644 index 0000000000..958a3e3ab2 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Discovery/HooksDiscovery.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Graph; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// The default implementation for IHooksDiscovery + /// + public class HooksDiscovery : IHooksDiscovery where TEntity : class, IIdentifiable + { + private readonly ResourceHook[] _allHooks; + private readonly ResourceHook[] _databaseValuesAttributeAllowed = + { + ResourceHook.BeforeUpdate, + ResourceHook.BeforeUpdateRelationship, + ResourceHook.BeforeDelete + }; + /// + public ResourceHook[] ImplementedHooks { get; private set; } + public ResourceHook[] DatabaseValuesEnabledHooks { get; private set; } + public ResourceHook[] DatabaseValuesDisabledHooks { get; private set; } + + + public HooksDiscovery() + { + _allHooks = Enum.GetValues(typeof(ResourceHook)) + .Cast() + .Where(h => h != ResourceHook.None) + .ToArray(); + DiscoverImplementedHooksForModel(); + } + + /// + /// Discovers the implemented hooks for a model. + /// + /// The implemented hooks for model. + void DiscoverImplementedHooksForModel() + { + Type parameterizedResourceDefinition = typeof(ResourceDefinition); + var derivedTypes = TypeLocator.GetDerivedTypes(typeof(TEntity).Assembly, parameterizedResourceDefinition).ToList(); + + + var implementedHooks = new List(); + var enabledHooks = new List() { ResourceHook.BeforeImplicitUpdateRelationship } ; + var disabledHooks = new List(); + Type targetType = null; + try + { + targetType = derivedTypes.SingleOrDefault(); // multiple containers is not supported + } + catch + { + throw new JsonApiSetupException($"It is currently not supported to" + + "implement hooks across multiple implementations of ResourceDefinition"); + } + if (targetType != null) + { + foreach (var hook in _allHooks) + { + var method = targetType.GetMethod(hook.ToString("G")); + if (method.DeclaringType != parameterizedResourceDefinition) + { + implementedHooks.Add(hook); + var attr = method.GetCustomAttributes(true).OfType().SingleOrDefault(); + if (attr != null) + { + if (!_databaseValuesAttributeAllowed.Contains(hook)) + { + throw new JsonApiSetupException($"DatabaseValuesAttribute cannot be used on hook" + + $"{hook.ToString("G")} in resource definition {parameterizedResourceDefinition.Name}"); + } + var targetList = attr.value ? enabledHooks : disabledHooks; + targetList.Add(hook); + } + } + } + + } + ImplementedHooks = implementedHooks.ToArray(); + DatabaseValuesDisabledHooks = disabledHooks.ToArray(); + DatabaseValuesEnabledHooks = enabledHooks.ToArray(); + + } + } +} diff --git a/src/JsonApiDotNetCore/Hooks/Discovery/IHooksDiscovery.cs b/src/JsonApiDotNetCore/Hooks/Discovery/IHooksDiscovery.cs new file mode 100644 index 0000000000..709b30900e --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Discovery/IHooksDiscovery.cs @@ -0,0 +1,28 @@ +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + + /// + /// A singleton service for a particular TEntity that stores a field of + /// enums that represents which resource hooks have been implemented for that + /// particular entity. + /// + public interface IHooksDiscovery : IHooksDiscovery where TEntity : class, IIdentifiable + { + + } + + + public interface IHooksDiscovery + { + /// + /// A list of the implemented hooks for resource TEntity + /// + /// The implemented hooks. + ResourceHook[] ImplementedHooks { get; } + ResourceHook[] DatabaseValuesEnabledHooks { get; } + ResourceHook[] DatabaseValuesDisabledHooks { get; } + } + +} diff --git a/src/JsonApiDotNetCore/Hooks/Discovery/LoadDatabaseValuesAttribute.cs b/src/JsonApiDotNetCore/Hooks/Discovery/LoadDatabaseValuesAttribute.cs new file mode 100644 index 0000000000..6a47e9d2a0 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Discovery/LoadDatabaseValuesAttribute.cs @@ -0,0 +1,12 @@ +using System; +namespace JsonApiDotNetCore.Hooks +{ + public class LoadDatabaseValues : Attribute + { + public readonly bool value; + public LoadDatabaseValues(bool mode = true) + { + value = mode; + } + } +} diff --git a/src/JsonApiDotNetCore/Hooks/Execution/AffectedRelationships.cs b/src/JsonApiDotNetCore/Hooks/Execution/AffectedRelationships.cs new file mode 100644 index 0000000000..dc2590f9bd --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Execution/AffectedRelationships.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + public interface IAffectedRelationships { } + + /// + /// A helper class that provides insights in which relationships have been updated for which entities. + /// + public interface IAffectedRelationships : IAffectedRelationships where TDependent : class, IIdentifiable + { + /// + /// Gets a dictionary of all entities grouped by affected relationship. + /// + Dictionary> AllByRelationships(); + + /// + /// Gets a dictionary of all entities that have an affected relationship to type + /// + Dictionary> GetByRelationship() where TPrincipal : class, IIdentifiable; + /// + /// Gets a dictionary of all entities that have an affected relationship to type + /// + Dictionary> GetByRelationship(Type principalType); + } + + public class AffectedRelationships : IAffectedRelationships where TDependent : class, IIdentifiable + { + private readonly Dictionary> _groups; + + public Dictionary> AllByRelationships() + { + return _groups?.ToDictionary(p => p.Key.Attribute, p => p.Value); + } + internal AffectedRelationships(Dictionary relationships) + { + _groups = relationships.ToDictionary(kvp => kvp.Key, kvp => new HashSet((IEnumerable)kvp.Value)); + } + + public Dictionary> GetByRelationship() where TPrincipal : class, IIdentifiable + { + return GetByRelationship(typeof(TPrincipal)); + } + + public Dictionary> GetByRelationship(Type principalType) + { + return _groups?.Where(p => p.Key.PrincipalType == principalType).ToDictionary(p => p.Key.Attribute, p => p.Value); + } + } +} diff --git a/src/JsonApiDotNetCore/Hooks/Execution/AffectedResourceDiff.cs b/src/JsonApiDotNetCore/Hooks/Execution/AffectedResourceDiff.cs new file mode 100644 index 0000000000..59102a50ad --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Execution/AffectedResourceDiff.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// A helper class that provides insight in what is to be updated. The + /// property reflects what was parsed from the incoming request, + /// where the reflects what is the current state in the database. + /// + /// Any relationships that are updated can be retrieved via the methods implemented on + /// . + /// + public interface IAffectedResourcesDiff : IAffectedResources where TEntity : class, IIdentifiable + { + HashSet DatabaseValues { get; } + IEnumerable> GetDiff(); + } + + public class ResourceDiff : AffectedResources, IAffectedResourcesDiff where TEntity : class, IIdentifiable + { + + private readonly HashSet _databaseValues; + private readonly bool _databaseValuesLoaded; + + /// + /// the current database values of the affected resources collection. + /// + public HashSet DatabaseValues { get => _databaseValues ?? ThrowNoDbValuesError(); } + + internal ResourceDiff(IEnumerable requestEntities, + IEnumerable databaseEntities, + Dictionary relationships) : base(requestEntities, relationships) + { + _databaseValues = (HashSet)databaseEntities; + _databaseValuesLoaded |= _databaseValues != null; + } + + public IEnumerable> GetDiff() + { + foreach (var entity in Entities) + { + TEntity currentValueInDatabase = null; + if (_databaseValuesLoaded) currentValueInDatabase = _databaseValues.Single(e => entity.StringId == e.StringId); + yield return new ResourceDiffPair(entity, currentValueInDatabase); + } + } + + private HashSet ThrowNoDbValuesError() + { + throw new MemberAccessException("Cannot access database entities if the LoadDatabaseValues option is set to false"); + } + } + + public class ResourceDiffPair where TEntity : class, IIdentifiable + { + internal ResourceDiffPair(TEntity entity, TEntity databaseValue) + { + Entity = entity; + DatabaseValue = databaseValue; + } + + public TEntity Entity { get; private set; } + public TEntity DatabaseValue { get; private set; } + } +} diff --git a/src/JsonApiDotNetCore/Hooks/Execution/AffectedResources.cs b/src/JsonApiDotNetCore/Hooks/Execution/AffectedResources.cs new file mode 100644 index 0000000000..a004dcc244 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Execution/AffectedResources.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; +using JsonApiDotNetCore.Models; +using System.Linq; +using System.Collections; + +namespace JsonApiDotNetCore.Hooks +{ + + public interface IAffectedResources : IEnumerable where TEntity : class, IIdentifiable + { + HashSet Entities { get; } + } + + public class AffectedResources : AffectedRelationships, IAffectedResources where TEntity : class, IIdentifiable + { + /// + /// The entities that are affected by the request. + /// + public HashSet Entities { get; } + + internal AffectedResources(IEnumerable entities, + Dictionary relationships) : base(relationships) + { + Entities = new HashSet(entities.Cast()); + } + public IEnumerator GetEnumerator() + { + return Entities.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } + +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Hooks/Execution/HookExecutorHelper.cs b/src/JsonApiDotNetCore/Hooks/Execution/HookExecutorHelper.cs new file mode 100644 index 0000000000..68b8018c01 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Execution/HookExecutorHelper.cs @@ -0,0 +1,224 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using JsonApiDotNetCore.Data; +using JsonApiDotNetCore.Internal.Generics; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Extensions; +using PrincipalType = System.Type; +using DependentType = System.Type; +using Microsoft.EntityFrameworkCore; +using JsonApiDotNetCore.Services; +using JsonApiDotNetCore.Internal; + +namespace JsonApiDotNetCore.Hooks +{ + /// + internal class HookExecutorHelper : IHookExecutorHelper + { + protected readonly IGenericProcessorFactory _genericProcessorFactory; + protected readonly IResourceGraph _graph; + protected readonly Dictionary _hookContainers; + protected readonly Dictionary _hookDiscoveries; + protected readonly List _targetedHooksForRelatedEntities; + protected readonly IJsonApiContext _context; + protected Dictionary> _meta; + + public HookExecutorHelper( + IGenericProcessorFactory genericProcessorFactory, + IResourceGraph graph, + IJsonApiContext context + ) + { + _genericProcessorFactory = genericProcessorFactory; + _graph = graph; + _context = context; + _meta = new Dictionary>(); + _hookContainers = new Dictionary(); + _hookDiscoveries = new Dictionary(); + _targetedHooksForRelatedEntities = new List(); + } + + /// + public IResourceHookContainer GetResourceHookContainer(DependentType dependentType, ResourceHook hook = ResourceHook.None) + { + /// checking the cache if we have a reference for the requested container, + /// regardless of the hook we will use it for. If the value is null, + /// it means there was no implementation IResourceHookContainer at all, + /// so we need not even bother. + if (!_hookContainers.TryGetValue(dependentType, out IResourceHookContainer container)) + { + container = (_genericProcessorFactory.GetProcessor(typeof(ResourceDefinition<>), dependentType)); + _hookContainers[dependentType] = container; + } + if (container == null) return container; + + /// if there was a container, first check if it implements the hook we + /// want to use it for. + List targetHooks; + if (hook == ResourceHook.None) + { + CheckForTargetHookExistence(); + targetHooks = _targetedHooksForRelatedEntities; + } + else + { + targetHooks = new List() { hook }; + } + + foreach (ResourceHook targetHook in targetHooks) + { + if (ShouldExecuteHook(dependentType, targetHook)) return container; + } + return null; + } + + /// + public IResourceHookContainer GetResourceHookContainer(ResourceHook hook = ResourceHook.None) where TEntity : class, IIdentifiable + { + return (IResourceHookContainer)GetResourceHookContainer(typeof(TEntity), hook); + } + + public IEnumerable LoadDbValues(PrincipalType entityTypeForRepository, IEnumerable entities, ResourceHook hook, params RelationshipProxy[] relationships) + { + var paths = relationships.Select(p => p.Attribute.RelationshipPath).ToArray(); + var idType = GetIdentifierType(entityTypeForRepository); + var parameterizedGetWhere = GetType() + .GetMethod(nameof(GetWhereAndInclude), BindingFlags.NonPublic | BindingFlags.Instance) + .MakeGenericMethod(entityTypeForRepository, idType); + var casted = ((IEnumerable)entities).Cast(); + var ids = casted.Select(e => e.StringId).Cast(idType); + var values = (IEnumerable)parameterizedGetWhere.Invoke(this, new object[] { ids, paths }); + if (values == null) return null; + return (IEnumerable)Activator.CreateInstance(typeof(HashSet<>).MakeGenericType(entityTypeForRepository), values.Cast(entityTypeForRepository)); + } + + public HashSet LoadDbValues(IEnumerable entities, ResourceHook hook, params RelationshipProxy[] relationships) where TEntity : class, IIdentifiable + { + var entityType = typeof(TEntity); + var dbValues = LoadDbValues(entityType, entities, hook, relationships)?.Cast(); + if (dbValues == null) return null; + return new HashSet(dbValues); + } + + + public bool ShouldLoadDbValues(Type entityType, ResourceHook hook) + { + var discovery = GetHookDiscovery(entityType); + + if (discovery.DatabaseValuesDisabledHooks.Contains(hook)) + { + return false; + } + else if (discovery.DatabaseValuesEnabledHooks.Contains(hook)) + { + return true; + } + else + { + return _context.Options.LoadDatabaseValues; + } + } + + bool ShouldExecuteHook(DependentType entityType, ResourceHook hook) + { + var discovery = GetHookDiscovery(entityType); + return discovery.ImplementedHooks.Contains(hook); + } + + + void CheckForTargetHookExistence() + { + if (!_targetedHooksForRelatedEntities.Any()) + throw new InvalidOperationException("Something is not right in the breadth first traversal of resource hook: " + + "trying to get meta information when no allowed hooks are set"); + } + + IHooksDiscovery GetHookDiscovery(Type entityType) + { + if (!_hookDiscoveries.TryGetValue(entityType, out IHooksDiscovery discovery)) + { + discovery = _genericProcessorFactory.GetProcessor(typeof(IHooksDiscovery<>), entityType); + _hookDiscoveries[entityType] = discovery; + } + return discovery; + } + + Type GetIdentifierType(Type entityType) + { + return entityType.GetProperty("Id").PropertyType; + } + + IEnumerable GetWhereAndInclude(IEnumerable ids, string[] relationshipPaths) where TEntity : class, IIdentifiable + { + var repo = GetRepository(); + var query = repo.Get().Where(e => ids.Contains(e.Id)); + foreach (var path in relationshipPaths) + { + query = query.Include(path); + } + return query.ToList(); + } + + IEntityReadRepository GetRepository() where TEntity : class, IIdentifiable + { + return _genericProcessorFactory.GetProcessor>(typeof(IEntityReadRepository<,>), typeof(TEntity), typeof(TId)); + } + + + public Dictionary LoadImplicitlyAffected( + Dictionary principalEntitiesByRelation, + IEnumerable existingDependentEntities = null) + { + var implicitlyAffected = new Dictionary(); + foreach (var kvp in principalEntitiesByRelation) + { + if (IsHasManyThrough(kvp, out var principals, out var relationship)) continue; + + // note that we dont't have to check if BeforeImplicitUpdate hook is implemented. If not, it wont ever get here. + var includedPrincipals = LoadDbValues(relationship.PrincipalType, principals, ResourceHook.BeforeImplicitUpdateRelationship, relationship); + + foreach (IIdentifiable ip in includedPrincipals) + { + IList dbDependentEntityList = null; + var relationshipValue = relationship.GetValue(ip); + if (!(relationshipValue is IEnumerable)) + { + dbDependentEntityList = TypeHelper.CreateListFor(relationship.DependentType); + if (relationshipValue != null) dbDependentEntityList.Add(relationshipValue); + } + else + { + dbDependentEntityList = (IList)relationshipValue; + } + var dbDependentEntityListCasted = dbDependentEntityList.Cast().ToList(); + if (existingDependentEntities != null) dbDependentEntityListCasted = dbDependentEntityListCasted.Except(existingDependentEntities.Cast(), ResourceHookExecutor.Comparer).ToList(); + + if (dbDependentEntityListCasted.Any()) + { + if (!implicitlyAffected.TryGetValue(relationship, out IEnumerable affected)) + { + affected = TypeHelper.CreateListFor(relationship.DependentType); + implicitlyAffected[relationship] = affected; + } + ((IList)affected).AddRange(dbDependentEntityListCasted); + } + } + } + + return implicitlyAffected.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + + } + + bool IsHasManyThrough(KeyValuePair kvp, + out IEnumerable entities, + out RelationshipProxy proxy) + { + proxy = kvp.Key; + entities = (kvp.Value); + return (kvp.Key.Attribute is HasManyThroughAttribute); + } + } +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Hooks/Execution/IHookExecutorHelper.cs b/src/JsonApiDotNetCore/Hooks/Execution/IHookExecutorHelper.cs new file mode 100644 index 0000000000..33546aa864 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Execution/IHookExecutorHelper.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// A helper class for retrieving meta data about hooks, + /// fetching database values and performing other recurring internal operations. + /// + /// Used internalyl by + /// + internal interface IHookExecutorHelper + { + /// + /// For a particular ResourceHook and for a given model type, checks if + /// the ResourceDefinition has an implementation for the hook + /// and if so, return it. + /// + /// Also caches the retrieves containers so we don't need to reflectively + /// instantiate them multiple times. + /// + IResourceHookContainer GetResourceHookContainer(Type targetEntity, ResourceHook hook = ResourceHook.None); + + /// + /// For a particular ResourceHook and for a given model type, checks if + /// the ResourceDefinition has an implementation for the hook + /// and if so, return it. + /// + /// Also caches the retrieves containers so we don't need to reflectively + /// instantiate them multiple times. + /// + IResourceHookContainer GetResourceHookContainer(ResourceHook hook = ResourceHook.None) where TEntity : class, IIdentifiable; + + /// + /// Load the implicitly affected entities from the database for a given set of target target entities and involved relationships + /// + /// The implicitly affected entities by relationship + Dictionary LoadImplicitlyAffected(Dictionary principalEntities, IEnumerable existingDependentEntities = null); + + /// + /// For a set of entities, loads current values from the database + /// + IEnumerable LoadDbValues(Type repositoryEntityType, IEnumerable entities, ResourceHook hook, params RelationshipProxy[] relationships); + bool ShouldLoadDbValues(Type containerEntityType, ResourceHook hook); + } +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Hooks/Execution/ResourceHookEnum.cs b/src/JsonApiDotNetCore/Hooks/Execution/ResourceHookEnum.cs new file mode 100644 index 0000000000..9a22e527b1 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Execution/ResourceHookEnum.cs @@ -0,0 +1,24 @@ +namespace JsonApiDotNetCore.Hooks +{ + + /// + /// A enum that represent the available resource hooks. + /// + public enum ResourceHook + { + None, // https://stackoverflow.com/questions/24151354/is-it-a-good-practice-to-add-a-null-or-none-member-to-the-enum + BeforeCreate, + BeforeRead, + BeforeUpdate, + BeforeDelete, + BeforeUpdateRelationship, + BeforeImplicitUpdateRelationship, + OnReturn, + AfterCreate, + AfterRead, + AfterUpdate, + AfterDelete, + AfterUpdateRelationship, + } + +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Hooks/Execution/ResourcePipelineEnum.cs b/src/JsonApiDotNetCore/Hooks/Execution/ResourcePipelineEnum.cs new file mode 100644 index 0000000000..177423ed4f --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Execution/ResourcePipelineEnum.cs @@ -0,0 +1,22 @@ +namespace JsonApiDotNetCore.Hooks +{ + /// + /// An enum that represents the initiator of a resource hook. Eg, when BeforeCreate() + /// is called from EntityResourceService.GetAsync(TId id), it will be called + /// with parameter pipeline = ResourceAction.GetSingle. + /// + public enum ResourcePipeline + { + None, + Get, + GetSingle, + GetRelationship, + Post, + Patch, + PatchRelationship, + Delete, + BulkPost, + BulkPatch, + BulkDelete + } +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Hooks/IResourceHookContainer.cs b/src/JsonApiDotNetCore/Hooks/IResourceHookContainer.cs new file mode 100644 index 0000000000..7597a02d6e --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/IResourceHookContainer.cs @@ -0,0 +1,220 @@ +using System.Collections.Generic; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Services; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// Not meant for public usage. Used internally in the + /// + public interface IResourceHookContainer { } + + /// + /// Implement this interface to implement business logic hooks on . + /// + public interface IResourceHookContainer : IBeforeHooks, IAfterHooks, IOnHooks, IResourceHookContainer where TEntity : class, IIdentifiable { } + + /// + /// Wrapper interface for all After hooks. + /// + public interface IAfterHooks where TEntity : class, IIdentifiable + { + /// + /// Implement this hook to run custom logic in the + /// layer just after creation of entities of type . + /// + /// If relationships were created with the created entities, this will + /// be reflected by the corresponding NavigationProperty being set. + /// For each of these relationships, the + /// hook is fired after the execution of this hook. + /// + /// The transformed entity set + /// The unique set of affected entities. + /// An enum indicating from where the hook was triggered. + void AfterCreate(HashSet entities, ResourcePipeline pipeline); + /// + /// Implement this hook to run custom logic in the + /// layer just after reading entities of type . + /// + /// The unique set of affected entities. + /// An enum indicating from where the hook was triggered. + /// A boolean to indicate whether the entities in this hook execution are the main entities of the request, + /// or if they were included as a relationship + void AfterRead(HashSet entities, ResourcePipeline pipeline, bool isIncluded = false); + /// + /// Implement this hook to run custom logic in the + /// layer just after updating entities of type . + /// + /// If relationships were updated with the updated entities, this will + /// be reflected by the corresponding NavigationProperty being set. + /// For each of these relationships, the + /// hook is fired after the execution of this hook. + /// + /// The unique set of affected entities. + /// An enum indicating from where the hook was triggered. + void AfterUpdate(HashSet entities, ResourcePipeline pipeline); + /// + /// Implement this hook to run custom logic in the + /// layer just after deletion of entities of type . + /// + /// The unique set of affected entities. + /// An enum indicating from where the hook was triggered. + /// If set to true if the deletion was succeeded in the repository layer. + void AfterDelete(HashSet entities, ResourcePipeline pipeline, bool succeeded); + /// + /// Implement this hook to run custom logic in the layer + /// just after a relationship was updated. + /// + /// Relationship helper. + /// An enum indicating from where the hook was triggered. + void AfterUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline); + } + + /// + /// Wrapper interface for all Before hooks. + /// + public interface IBeforeHooks where TEntity : class, IIdentifiable + { + /// + /// Implement this hook to run custom logic in the + /// layer just before creation of entities of type . + /// + /// For the pipeline, + /// will typically contain one entry. For , + /// can contain multiple entities. + /// + /// The returned may be a subset + /// of , in which case the operation of the + /// pipeline will not be executed for the omitted entities. The returned + /// set may also contain custom changes of the properties on the entities. + /// + /// If new relationships are to be created with the to-be-created entities, + /// this will be reflected by the corresponding NavigationProperty being set. + /// For each of these relationships, the + /// hook is fired after the execution of this hook. + /// + /// The transformed entity set + /// The unique set of affected entities. + /// An enum indicating from where the hook was triggered. + IEnumerable BeforeCreate(IAffectedResources entities, ResourcePipeline pipeline); + /// + /// Implement this hook to run custom logic in the + /// layer just before reading entities of type . + /// + /// An enum indicating from where the hook was triggered. + /// Indicates whether the to be queried entities are the main request entities or if they were included + /// The string id of the requested entity, in the case of + void BeforeRead(ResourcePipeline pipeline, bool isIncluded = false, string stringId = null); + /// + /// Implement this hook to run custom logic in the + /// layer just before updating entities of type . + /// + /// For the pipeline, the + /// will typically contain one entity. + /// For , this it may contain + /// multiple entities. + /// + /// The returned may be a subset + /// of the property in parameter , + /// in which case the operation of the pipeline will not be executed + /// for the omitted entities. The returned set may also contain custom + /// changes of the properties on the entities. + /// + /// If new relationships are to be created with the to-be-updated entities, + /// this will be reflected by the corresponding NavigationProperty being set. + /// For each of these relationships, the + /// hook is fired after the execution of this hook. + /// + /// If by the creation of these relationships, any other relationships (eg + /// in the case of an already populated one-to-one relationship) are implicitly + /// affected, the + /// hook is fired for these. + /// + /// The transformed entity set + /// The entity diff. + /// An enum indicating from where the hook was triggered. + IEnumerable BeforeUpdate(IAffectedResourcesDiff ResourceDiff, ResourcePipeline pipeline); + /// + /// Implement this hook to run custom logic in the + /// layer just before deleting entities of type . + /// + /// For the pipeline, + /// will typically contain one entity. + /// For , this it may contain + /// multiple entities. + /// + /// The returned may be a subset + /// of , in which case the operation of the + /// pipeline will not be executed for the omitted entities. + /// + /// If by the deletion of these entities any other entities are affected + /// implicitly by the removal of their relationships (eg + /// in the case of an one-to-one relationship), the + /// hook is fired for these entities. + /// + /// The transformed entity set + /// The unique set of affected entities. + /// An enum indicating from where the hook was triggered. + IEnumerable BeforeDelete(IAffectedResources entities, ResourcePipeline pipeline); + /// + /// Implement this hook to run custom logic in the + /// layer just before updating relationships to entities of type . + /// + /// This hook is fired when a relationship is created to entities of type + /// from a dependent pipeline ( + /// or ). For example, If an Article was created + /// and its author relationship was set to an existing Person, this hook will be fired + /// for that particular Person. + /// + /// The returned may be a subset + /// of , in which case the operation of the + /// pipeline will not be executed for any entity whose id was omitted + /// + /// + /// The transformed set of ids + /// The unique set of ids + /// An enum indicating from where the hook was triggered. + /// A helper that groups the entities by the affected relationship + IEnumerable BeforeUpdateRelationship(HashSet ids, IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline); + /// + /// Implement this hook to run custom logic in the + /// layer just before implicitly updating relationships to entities of type . + /// + /// This hook is fired when a relationship to entities of type + /// is implicitly affected from a dependent pipeline ( + /// or ). For example, if an Article was updated + /// by setting its author relationship (one-to-one) to an existing Person, + /// and by this the relationship to a different Person was implicitly removed, + /// this hook will be fired for the latter Person. + /// + /// See for information about + /// when this hook is fired. + /// + /// + /// The transformed set of ids + /// A helper that groups the entities by the affected relationship + /// An enum indicating from where the hook was triggered. + void BeforeImplicitUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline); + } + + /// + /// Wrapper interface for all on hooks. + /// + public interface IOnHooks where TEntity : class, IIdentifiable + { + /// + /// Implement this hook to transform the result data just before returning + /// the entities of type from the + /// layer + /// + /// The returned may be a subset + /// of and may contain changes in properties + /// of the encapsulated entities. + /// + /// + /// The transformed entity set + /// The unique set of affected entities + /// An enum indicating from where the hook was triggered. + IEnumerable OnReturn(HashSet entities, ResourcePipeline pipeline); + } +} diff --git a/src/JsonApiDotNetCore/Hooks/IResourceHookExecutor.cs b/src/JsonApiDotNetCore/Hooks/IResourceHookExecutor.cs new file mode 100644 index 0000000000..75c2a35f2e --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/IResourceHookExecutor.cs @@ -0,0 +1,161 @@ +using System.Collections.Generic; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Services; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// Transient service responsible for executing Resource Hooks as defined + /// in . see methods in + /// , and + /// for more information. + /// + /// Uses for traversal of nested entity data structures. + /// Uses for retrieving meta data about hooks, + /// fetching database values and performing other recurring internal operations. + /// + public interface IResourceHookExecutor : IBeforeExecutor, IAfterExecutor, IOnExecutor { } + + /// + /// Wrapper interface for all Before execution methods. + /// + public interface IBeforeExecutor + { + /// + /// Executes the Before Cycle by firing the appropiate hooks if they are implemented. + /// The returned set will be used in the actual operation in . + /// + /// Fires the + /// hook where T = for values in parameter . + /// + /// Fires the + /// hook for any related (nested) entity for values within parameter + /// + /// The transformed set + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + IEnumerable BeforeCreate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable; + /// + /// Executes the Before Cycle by firing the appropiate hooks if they are implemented. + /// + /// Fires the + /// hook where T = for the requested + /// entities as well as any related relationship. + /// + /// An enum indicating from where the hook was triggered. + /// StringId of the requested entity in the case of + /// . + /// The type of the request entity + void BeforeRead(ResourcePipeline pipeline, string stringId = null) where TEntity : class, IIdentifiable; + /// + /// Executes the Before Cycle by firing the appropiate hooks if they are implemented. + /// The returned set will be used in the actual operation in . + /// + /// Fires the + /// hook where T = for values in parameter . + /// + /// Fires the + /// hook for any related (nested) entity for values within parameter + /// + /// Fires the + /// hook for any entities that are indirectly (implicitly) affected by this operation. + /// Eg: when updating a one-to-one relationship of an entity which already + /// had this relationship populated, then this update will indirectly affect + /// the existing relationship value. + /// + /// The transformed set + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + IEnumerable BeforeUpdate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable; + /// + /// Executes the Before Cycle by firing the appropiate hooks if they are implemented. + /// The returned set will be used in the actual operation in . + /// + /// Fires the + /// hook where T = for values in parameter . + /// + /// Fires the + /// hook for any entities that are indirectly (implicitly) affected by this operation. + /// Eg: when deleting an entity that has relationships set to other entities, + /// these other entities are implicitly affected by the delete operation. + /// + /// The transformed set + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + IEnumerable BeforeDelete(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable; + } + + /// + /// Wrapper interface for all After execution methods. + /// + public interface IAfterExecutor + { + /// + /// Executes the After Cycle by firing the appropiate hooks if they are implemented. + /// + /// Fires the + /// hook where T = for values in parameter . + /// + /// Fires the + /// hook for any related (nested) entity for values within parameter + /// + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + void AfterCreate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable; + /// + /// Executes the After Cycle by firing the appropiate hooks if they are implemented. + /// + /// Fires the for every unique + /// entity type occuring in parameter . + /// + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + void AfterRead(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable; + /// + /// Executes the After Cycle by firing the appropiate hooks if they are implemented. + /// + /// Fires the + /// hook where T = for values in parameter . + /// + /// Fires the + /// hook for any related (nested) entity for values within parameter + /// + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + void AfterUpdate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable; + /// + /// Executes the After Cycle by firing the appropiate hooks if they are implemented. + /// + /// Fires the + /// hook where T = for values in parameter . + /// + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + void AfterDelete(IEnumerable entities, ResourcePipeline pipeline, bool succeeded) where TEntity : class, IIdentifiable; + } + + /// + /// Wrapper interface for all On execution methods. + /// + public interface IOnExecutor + { + /// + /// Executes the On Cycle by firing the appropiate hooks if they are implemented. + /// + /// Fires the for every unique + /// entity type occuring in parameter . + /// + /// The transformed set + /// Target entities for the Before cycle. + /// An enum indicating from where the hook was triggered. + /// The type of the root entities + IEnumerable OnReturn(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable; + } +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Hooks/ResourceHookExecutor.cs b/src/JsonApiDotNetCore/Hooks/ResourceHookExecutor.cs new file mode 100644 index 0000000000..aca190225a --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/ResourceHookExecutor.cs @@ -0,0 +1,407 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using PrincipalType = System.Type; +using DependentType = System.Type; +using JsonApiDotNetCore.Services; +using JsonApiDotNetCore.Extensions; + +namespace JsonApiDotNetCore.Hooks +{ + /// + internal class ResourceHookExecutor : IResourceHookExecutor + { + public static readonly IdentifiableComparer Comparer = new IdentifiableComparer(); + internal readonly TraversalHelper _traversalHelper; + internal readonly IHookExecutorHelper _executorHelper; + protected readonly IJsonApiContext _context; + private readonly IResourceGraph _graph; + + public ResourceHookExecutor(IHookExecutorHelper helper, IJsonApiContext context, IResourceGraph graph) + { + _executorHelper = helper; + _context = context; + _graph = graph; + _traversalHelper = new TraversalHelper(graph, _context); + } + + /// + public virtual void BeforeRead(ResourcePipeline pipeline, string stringId = null) where TEntity : class, IIdentifiable + { + var hookContainer = _executorHelper.GetResourceHookContainer(ResourceHook.BeforeRead); + hookContainer?.BeforeRead(pipeline, false, stringId); + var contextEntity = _graph.GetContextEntity(typeof(TEntity)); + var calledContainers = new List() { typeof(TEntity) }; + foreach (var relationshipPath in _context.IncludedRelationships) + { + RecursiveBeforeRead(contextEntity, relationshipPath.Split('.').ToList(), pipeline, calledContainers); + } + } + + /// + public virtual IEnumerable BeforeUpdate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.BeforeUpdate, entities, out var container, out var node)) + { + var dbValues = LoadDbValues(typeof(TEntity), (IEnumerable)node.UniqueEntities, ResourceHook.BeforeUpdate, node.RelationshipsToNextLayer); + var diff = new ResourceDiff(node.UniqueEntities, dbValues, node.PrincipalsToNextLayer()); + IEnumerable updated = container.BeforeUpdate(diff, pipeline); + node.UpdateUnique(updated); + node.Reassign(entities); + } + + FireNestedBeforeUpdateHooks(pipeline, _traversalHelper.CreateNextLayer(node)); + return entities; + } + + + /// + public virtual IEnumerable BeforeCreate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.BeforeCreate, entities, out var container, out var node)) + { + var affected = new AffectedResources((HashSet)node.UniqueEntities, node.PrincipalsToNextLayer()); + IEnumerable updated = container.BeforeCreate(affected, pipeline); + node.UpdateUnique(updated); + node.Reassign(entities); + } + + FireNestedBeforeUpdateHooks(pipeline, _traversalHelper.CreateNextLayer(node)); + return entities; + } + + /// + public virtual IEnumerable BeforeDelete(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.BeforeDelete, entities, out var container, out var node)) + { + var targetEntities = LoadDbValues(typeof(TEntity), (IEnumerable)node.UniqueEntities, ResourceHook.BeforeDelete, node.RelationshipsToNextLayer) ?? node.UniqueEntities; + var affected = new AffectedResources(targetEntities, node.PrincipalsToNextLayer()); + + IEnumerable updated = container.BeforeDelete(affected, pipeline); + node.UpdateUnique(updated); + node.Reassign(entities); + } + + foreach (var entry in node.PrincipalsToNextLayerByType()) + { + var dependentType = entry.Key; + var implicitTargets = entry.Value; + FireForAffectedImplicits(dependentType, implicitTargets, pipeline); + } + return entities; + } + + /// + public virtual IEnumerable OnReturn(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.OnReturn, entities, out var container, out var node) && pipeline != ResourcePipeline.GetRelationship) + { + IEnumerable updated = container.OnReturn((HashSet)node.UniqueEntities, pipeline); + ValidateHookResponse(updated); + node.UpdateUnique(updated); + node.Reassign(entities); + } + + Traverse(_traversalHelper.CreateNextLayer(node), ResourceHook.OnReturn, (nextContainer, nextNode) => + { + var filteredUniqueSet = CallHook(nextContainer, ResourceHook.OnReturn, new object[] { nextNode.UniqueEntities, pipeline }); + nextNode.UpdateUnique(filteredUniqueSet); + nextNode.Reassign(); + }); + return entities; + } + + /// + public virtual void AfterRead(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.AfterRead, entities, out var container, out var node)) + { + container.AfterRead((HashSet)node.UniqueEntities, pipeline); + } + + Traverse(_traversalHelper.CreateNextLayer(node), ResourceHook.AfterRead, (nextContainer, nextNode) => + { + CallHook(nextContainer, ResourceHook.AfterRead, new object[] { nextNode.UniqueEntities, pipeline, true }); + }); + } + + /// + public virtual void AfterCreate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.AfterCreate, entities, out var container, out var node)) + { + container.AfterCreate((HashSet)node.UniqueEntities, pipeline); + } + + Traverse(_traversalHelper.CreateNextLayer(node), + ResourceHook.AfterUpdateRelationship, + (nextContainer, nextNode) => FireAfterUpdateRelationship(nextContainer, nextNode, pipeline)); + } + + /// + public virtual void AfterUpdate(IEnumerable entities, ResourcePipeline pipeline) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.AfterUpdate, entities, out var container, out var node)) + { + container.AfterUpdate((HashSet)node.UniqueEntities, pipeline); + } + + Traverse(_traversalHelper.CreateNextLayer(node), + ResourceHook.AfterUpdateRelationship, + (nextContainer, nextNode) => FireAfterUpdateRelationship(nextContainer, nextNode, pipeline)); + } + + /// + public virtual void AfterDelete(IEnumerable entities, ResourcePipeline pipeline, bool succeeded) where TEntity : class, IIdentifiable + { + if (GetHook(ResourceHook.AfterDelete, entities, out var container, out var node)) + { + container.AfterDelete((HashSet)node.UniqueEntities, pipeline, succeeded); + } + } + + /// + /// For a given target and for a given type + /// , gets the hook container if the target + /// hook was implemented and should be executed. + /// + /// Along the way, creates a traversable node from the root entity set. + /// + /// true, if hook was implemented, false otherwise. + bool GetHook(ResourceHook target, IEnumerable entities, + out IResourceHookContainer container, + out RootNode node) where TEntity : class, IIdentifiable + { + node = _traversalHelper.CreateRootNode(entities); + container = _executorHelper.GetResourceHookContainer(target); + return container != null; + } + + /// + /// Traverses the nodes in a . + /// + void Traverse(EntityChildLayer currentLayer, ResourceHook target, Action action) + { + if (!currentLayer.AnyEntities()) return; + foreach (IEntityNode node in currentLayer) + { + var entityType = node.EntityType; + var hookContainer = _executorHelper.GetResourceHookContainer(entityType, target); + if (hookContainer == null) continue; + action(hookContainer, node); + } + + Traverse(_traversalHelper.CreateNextLayer(currentLayer.ToList()), target, action); + } + + /// + /// Recursively goes through the included relationships from JsonApiContext, + /// translates them to the corresponding hook containers and fires the + /// BeforeRead hook (if implemented) + /// + void RecursiveBeforeRead(ContextEntity contextEntity, List relationshipChain, ResourcePipeline pipeline, List calledContainers) + { + var target = relationshipChain.First(); + var relationship = contextEntity.Relationships.FirstOrDefault(r => r.PublicRelationshipName == target); + if (relationship == null) + { + throw new JsonApiException(400, $"Invalid relationship {target} on {contextEntity.EntityName}", + $"{contextEntity.EntityName} does not have a relationship named {target}"); + } + + if (!calledContainers.Contains(relationship.DependentType)) + { + calledContainers.Add(relationship.DependentType); + var container = _executorHelper.GetResourceHookContainer(relationship.DependentType, ResourceHook.BeforeRead); + if (container != null) + { + CallHook(container, ResourceHook.BeforeRead, new object[] { pipeline, true, null }); + } + } + relationshipChain.RemoveAt(0); + if (relationshipChain.Any()) + { + + RecursiveBeforeRead(_graph.GetContextEntity(relationship.DependentType), relationshipChain, pipeline, calledContainers); + } + } + + /// + /// Fires the nested before hooks. For example consider the case when + /// the owner of an article a1 (one-to-one) was updated from o1 to o2, where o2 + /// was already related to a2. Then, the BeforeUpdateRelationship should be + /// fired for o2, and the BeforeImplicitUpdateRelationship hook should be fired for + /// o2 and then too for a2. + /// + void FireNestedBeforeUpdateHooks(ResourcePipeline pipeline, EntityChildLayer layer) + { + foreach (IEntityNode node in layer) + { + var nestedHookcontainer = _executorHelper.GetResourceHookContainer(node.EntityType, ResourceHook.BeforeUpdateRelationship); + IEnumerable uniqueEntities = node.UniqueEntities; + DependentType entityType = node.EntityType; + + // fire the BeforeUpdateRelationship hook for o1 + if (nestedHookcontainer != null) + { + if (uniqueEntities.Cast().Any()) + { + var dbValues = LoadDbValues(entityType, uniqueEntities, ResourceHook.BeforeUpdateRelationship, node.RelationshipsToNextLayer); + var resourcesByRelationship = CreateRelationshipHelper(entityType, node.RelationshipsFromPreviousLayer.GetDependentEntities(), dbValues); + var allowedIds = CallHook(nestedHookcontainer, ResourceHook.BeforeUpdateRelationship, new object[] { GetIds(uniqueEntities), resourcesByRelationship, pipeline }).Cast(); + var updated = GetAllowedEntities(uniqueEntities, allowedIds); + node.UpdateUnique(updated); + node.Reassign(); + } + } + + // fire the BeforeImplicitUpdateRelationship hook for o1 + var implicitPrincipalTargets = node.RelationshipsFromPreviousLayer.GetPrincipalEntities(); + if (pipeline != ResourcePipeline.Post && implicitPrincipalTargets.Any()) + { + FireForAffectedImplicits(entityType, implicitPrincipalTargets, pipeline, uniqueEntities); + } + + // fire the BeforeImplicitUpdateRelationship hook for a2 + var dependentEntities = node.RelationshipsFromPreviousLayer.GetDependentEntities(); + if (dependentEntities.Any()) + { + (var implicitDependentTargets, var principalEntityType) = GetDependentImplicitsTargets(dependentEntities); + FireForAffectedImplicits(principalEntityType, implicitDependentTargets, pipeline); + } + } + } + + /// + /// Given a source of entities, gets the implicitly affected entities + /// from the database and calls the BeforeImplicitUpdateRelationship hook. + /// + void FireForAffectedImplicits(Type entityTypeToInclude, Dictionary implicitsTarget, ResourcePipeline pipeline, IEnumerable existingImplicitEntities = null) + { + var container = _executorHelper.GetResourceHookContainer(entityTypeToInclude, ResourceHook.BeforeImplicitUpdateRelationship); + if (container == null) return; + var implicitAffected = _executorHelper.LoadImplicitlyAffected(implicitsTarget, existingImplicitEntities); + if (!implicitAffected.Any()) return; + var resourcesByRelationship = CreateRelationshipHelper(entityTypeToInclude, implicitAffected); + CallHook(container, ResourceHook.BeforeImplicitUpdateRelationship, new object[] { resourcesByRelationship, pipeline, }); + } + + /// + /// checks that the collection does not contain more than one item when + /// relevant (eg AfterRead from GetSingle pipeline). + /// + /// The collection returned from the hook + /// The pipeine from which the hook was fired + void ValidateHookResponse(IEnumerable returnedList, ResourcePipeline pipeline = 0) + { + if (pipeline == ResourcePipeline.GetSingle && returnedList.Count() > 1) + { + throw new ApplicationException("The returned collection from this hook may contain at most one item in the case of the" + + pipeline.ToString("G") + "pipeline"); + } + } + + /// + /// NOTE: in JADNC usage, the root layer is ALWAYS homogenous, so we can be sure that for every + /// relationship to the previous layer, the principal type is the same. + /// + (Dictionary, PrincipalType) GetDependentImplicitsTargets(Dictionary dependentEntities) + { + PrincipalType principalType = dependentEntities.First().Key.PrincipalType; + var byInverseRelationship = dependentEntities.Where(kvp => kvp.Key.Attribute.InverseNavigation != null).ToDictionary(kvp => GetInverseRelationship(kvp.Key), kvp => kvp.Value); + return (byInverseRelationship, principalType); + + } + + /// + /// A helper method to call a hook on reflectively. + /// + IEnumerable CallHook(IResourceHookContainer container, ResourceHook hook, object[] arguments) + { + var method = container.GetType().GetMethod(hook.ToString("G")); + // note that some of the hooks return "void". When these hooks, the + // are called reflectively with Invoke like here, the return value + // is just null, so we don't have to worry about casting issues here. + return (IEnumerable)ThrowJsonApiExceptionOnError(() => method.Invoke(container, arguments)); + } + + /// + /// If the method, unwrap and throw the actual exception. + /// + object ThrowJsonApiExceptionOnError(Func action) + { + try + { + return action(); + } + catch (TargetInvocationException tie) + { + throw tie.InnerException; + } + } + + /// + /// Helper method to instantiate AffectedRelationships for a given + /// If are included, the values of the entries in need to be replaced with these values. + /// + /// The relationship helper. + IAffectedRelationships CreateRelationshipHelper(DependentType entityType, Dictionary prevLayerRelationships, IEnumerable dbValues = null) + { + if (dbValues != null) ReplaceWithDbValues(prevLayerRelationships, dbValues.Cast()); + return (IAffectedRelationships)TypeHelper.CreateInstanceOfOpenType(typeof(AffectedRelationships<>), entityType, true, prevLayerRelationships); + } + + /// + /// Replaces the entities in the values of the prevLayerRelationships dictionary + /// with the corresponding entities loaded from the db. + /// + void ReplaceWithDbValues(Dictionary prevLayerRelationships, IEnumerable dbValues) + { + foreach (var key in prevLayerRelationships.Keys.ToList()) + { + var replaced = prevLayerRelationships[key].Cast().Select(entity => dbValues.Single(dbEntity => dbEntity.StringId == entity.StringId)).Cast(key.DependentType); + prevLayerRelationships[key] = replaced; + } + } + + /// + /// Fitler the source set by removing the entities with id that are not + /// in . + /// + HashSet GetAllowedEntities(IEnumerable source, IEnumerable allowedIds) + { + return new HashSet(source.Cast().Where(ue => allowedIds.Contains(ue.StringId))); + } + + /// + /// Gets the inverse for + /// + RelationshipProxy GetInverseRelationship(RelationshipProxy proxy) + { + return new RelationshipProxy(_graph.GetInverseRelationship(proxy.Attribute), proxy.PrincipalType, false); + } + + IEnumerable LoadDbValues(Type containerEntityType, IEnumerable uniqueEntities, ResourceHook targetHook, RelationshipProxy[] relationshipsToNextLayer) + { + if (!_executorHelper.ShouldLoadDbValues(containerEntityType, targetHook)) return null; + return _executorHelper.LoadDbValues(containerEntityType, uniqueEntities, targetHook, relationshipsToNextLayer); + } + + void FireAfterUpdateRelationship(IResourceHookContainer container, IEntityNode node, ResourcePipeline pipeline) + { + var resourcesByRelationship = CreateRelationshipHelper(node.EntityType, node.RelationshipsFromPreviousLayer.GetDependentEntities()); + CallHook(container, ResourceHook.AfterUpdateRelationship, new object[] { resourcesByRelationship, pipeline }); + } + + HashSet GetIds(IEnumerable entities) + { + return new HashSet(entities.Cast().Select(e => e.StringId)); + } + } +} + diff --git a/src/JsonApiDotNetCore/Hooks/Traversal/ChildNode.cs b/src/JsonApiDotNetCore/Hooks/Traversal/ChildNode.cs new file mode 100644 index 0000000000..443ee7daf1 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Traversal/ChildNode.cs @@ -0,0 +1,85 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Extensions; +using JsonApiDotNetCore.Models; +using DependentType = System.Type; + +namespace JsonApiDotNetCore.Hooks +{ + /// + internal class ChildNode : IEntityNode where TEntity : class, IIdentifiable + { + /// + public DependentType EntityType { get; private set; } + /// + public RelationshipProxy[] RelationshipsToNextLayer { get; set; } + /// + public IEnumerable UniqueEntities + { + get + { + return new HashSet(_relationshipsFromPreviousLayer.SelectMany(rfpl => rfpl.DependentEntities)); + } + } + + /// + public IRelationshipsFromPreviousLayer RelationshipsFromPreviousLayer + { + get + { + return _relationshipsFromPreviousLayer; + } + } + + private readonly RelationshipsFromPreviousLayer _relationshipsFromPreviousLayer; + + public ChildNode(RelationshipProxy[] nextLayerRelationships, RelationshipsFromPreviousLayer prevLayerRelationships) + { + EntityType = typeof(TEntity); + RelationshipsToNextLayer = nextLayerRelationships; + _relationshipsFromPreviousLayer = prevLayerRelationships; + } + + /// + public void UpdateUnique(IEnumerable updated) + { + List casted = updated.Cast().ToList(); + foreach (var rpfl in _relationshipsFromPreviousLayer) + { + rpfl.DependentEntities = new HashSet(rpfl.DependentEntities.Intersect(casted, ResourceHookExecutor.Comparer).Cast()); + } + } + + /// + public void Reassign(IEnumerable updated = null) + { + var unique = (HashSet)UniqueEntities; + foreach (var rfpl in _relationshipsFromPreviousLayer) + { + var proxy = rfpl.Proxy; + var principalEntities = rfpl.PrincipalEntities; + + foreach (IIdentifiable principal in principalEntities) + { + var currentValue = proxy.GetValue(principal); + + if (currentValue is IEnumerable relationshipCollection) + { + var newValue = relationshipCollection.Intersect(unique, ResourceHookExecutor.Comparer).Cast(proxy.DependentType); + proxy.SetValue(principal, newValue); + } + else if (currentValue is IIdentifiable relationshipSingle) + { + if (!unique.Intersect(new HashSet() { relationshipSingle }, ResourceHookExecutor.Comparer).Any()) + { + proxy.SetValue(principal, null); + } + } + } + } + } + } + + +} diff --git a/src/JsonApiDotNetCore/Hooks/Traversal/IEntityNode.cs b/src/JsonApiDotNetCore/Hooks/Traversal/IEntityNode.cs new file mode 100644 index 0000000000..159b373ef5 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Traversal/IEntityNode.cs @@ -0,0 +1,39 @@ +using System.Collections; +using DependentType = System.Type; + +namespace JsonApiDotNetCore.Hooks +{ + internal interface IEntityNode + { + /// + /// Each node representes the entities of a given type throughout a particular layer. + /// + DependentType EntityType { get; } + /// + /// The unique set of entities in this node. Note that these are all of the same type. + /// + IEnumerable UniqueEntities { get; } + /// + /// Relationships to the next layer + /// + /// The relationships to next layer. + RelationshipProxy[] RelationshipsToNextLayer { get; } + /// + /// Relationships to the previous layer + /// + IRelationshipsFromPreviousLayer RelationshipsFromPreviousLayer { get; } + + /// + /// A helper method to assign relationships to the previous layer after firing hooks. + /// Or, in case of the root node, to update the original source enumerable. + /// + void Reassign(IEnumerable source = null); + /// + /// A helper method to internally update the unique set of entities as a result of + /// a filter action in a hook. + /// + /// Updated. + void UpdateUnique(IEnumerable updated); + } + +} diff --git a/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipGroup.cs b/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipGroup.cs new file mode 100644 index 0000000000..1ed52419c7 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipGroup.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + internal interface IRelationshipGroup + { + RelationshipProxy Proxy { get; } + HashSet PrincipalEntities { get; } + } + + internal class RelationshipGroup : IRelationshipGroup where TDependent : class, IIdentifiable + { + public RelationshipProxy Proxy { get; } + public HashSet PrincipalEntities { get; } + public HashSet DependentEntities { get; internal set; } + public RelationshipGroup(RelationshipProxy proxy, HashSet principalEntities, HashSet dependentEntities) + { + Proxy = proxy; + PrincipalEntities = principalEntities; + DependentEntities = dependentEntities; + } + } +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipProxy.cs b/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipProxy.cs new file mode 100644 index 0000000000..6e5d90ecc8 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipProxy.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using JsonApiDotNetCore.Extensions; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// A class used internally for resource hook execution. Not intended for developer use. + /// + /// A wrapper for RelationshipAttribute with an abstraction layer that works on the + /// getters and setters of relationships. These are different in the case of + /// HasMany vs HasManyThrough, and HasManyThrough. + /// It also depends on if the jointable entity + /// (eg ArticleTags) is identifiable (in which case we will traverse through + /// it and fire hooks for it, if defined) or not (in which case we skip + /// ArticleTags and go directly to Tags. + /// + /// TODO: We can consider moving fields like DependentType and PrincipalType + /// + public class RelationshipProxy + { + readonly bool _isHasManyThrough; + readonly bool _skipJoinTable; + + /// + /// The target type for this relationship attribute. + /// For HasOne has HasMany this is trivial: just the righthand side. + /// For HasManyThrough it is either the ThroughProperty (when the jointable is + /// Identifiable) or it is the righthand side (when the jointable is not identifiable) + /// + public Type DependentType { get; private set; } + public Type PrincipalType { get { return Attribute.PrincipalType; } } + public bool IsContextRelation { get; private set; } + + public RelationshipAttribute Attribute { get; set; } + public RelationshipProxy(RelationshipAttribute attr, Type relatedType, bool isContextRelation) + { + DependentType = relatedType; + Attribute = attr; + IsContextRelation = isContextRelation; + if (attr is HasManyThroughAttribute throughAttr) + { + _isHasManyThrough = true; + _skipJoinTable |= DependentType != throughAttr.ThroughType; + } + } + + /// + /// Gets the relationship value for a given parent entity. + /// Internally knows how to do this depending on the type of RelationshipAttribute + /// that this RelationshipProxy encapsulates. + /// + /// The relationship value. + /// Parent entity. + public object GetValue(IIdentifiable entity) + { + if (_isHasManyThrough) + { + var throughAttr = (HasManyThroughAttribute)Attribute; + if (!_skipJoinTable) + { + return throughAttr.ThroughProperty.GetValue(entity); + } + else + { + var collection = new List(); + var joinEntities = (IList)throughAttr.ThroughProperty.GetValue(entity); + if (joinEntities == null) return null; + + foreach (var joinEntity in joinEntities) + { + var rightEntity = (IIdentifiable)throughAttr.RightProperty.GetValue(joinEntity); + if (rightEntity == null) continue; + collection.Add(rightEntity); + } + return collection; + + } + + } + return Attribute.GetValue(entity); + } + + /// + /// Set the relationship value for a given parent entity. + /// Internally knows how to do this depending on the type of RelationshipAttribute + /// that this RelationshipProxy encapsulates. + /// + /// The relationship value. + /// Parent entity. + public void SetValue(IIdentifiable entity, object value) + { + if (_isHasManyThrough) + { + if (!_skipJoinTable) + { + var list = (IEnumerable)value; + ((HasManyThroughAttribute)Attribute).ThroughProperty.SetValue(entity, list.Cast(DependentType)); + return; + } + else + { + var throughAttr = (HasManyThroughAttribute)Attribute; + var joinEntities = (IEnumerable)throughAttr.ThroughProperty.GetValue(entity); + + var filteredList = new List(); + var rightEntities = ((IEnumerable)value).Cast(DependentType); + foreach (var je in joinEntities) + { + + if (((IList)rightEntities).Contains(throughAttr.RightProperty.GetValue(je))) + { + filteredList.Add(je); + } + } + throughAttr.ThroughProperty.SetValue(entity, filteredList.Cast(throughAttr.ThroughType)); + return; + } + } + Attribute.SetValue(entity, value); + } + } +} diff --git a/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipsFromPreviousLayer.cs b/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipsFromPreviousLayer.cs new file mode 100644 index 0000000000..95a96cf524 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Traversal/RelationshipsFromPreviousLayer.cs @@ -0,0 +1,54 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// A helper class for mapping relationships between a current and previous layer + /// + internal interface IRelationshipsFromPreviousLayer + { + /// + /// Grouped by relationship to the previous layer, gets all the entities of the current layer + /// + /// The dependent entities. + Dictionary GetDependentEntities(); + /// + /// Grouped by relationship to the previous layer, gets all the entities of the previous layer + /// + /// The dependent entities. + Dictionary GetPrincipalEntities(); + } + + internal class RelationshipsFromPreviousLayer : IRelationshipsFromPreviousLayer, IEnumerable> where TDependent : class, IIdentifiable + { + readonly IEnumerable> _collection; + + public RelationshipsFromPreviousLayer(IEnumerable> collection) + { + _collection = collection; + } + + public Dictionary GetDependentEntities() + { + return _collection.ToDictionary(rg => rg.Proxy, rg => (IEnumerable)rg.DependentEntities); + } + + public Dictionary GetPrincipalEntities() + { + return _collection.ToDictionary(rg => rg.Proxy, rg => (IEnumerable)rg.PrincipalEntities); + } + + public IEnumerator> GetEnumerator() + { + return _collection.Cast>().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/src/JsonApiDotNetCore/Hooks/Traversal/RootNode.cs b/src/JsonApiDotNetCore/Hooks/Traversal/RootNode.cs new file mode 100644 index 0000000000..d13640a956 --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Traversal/RootNode.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using JsonApiDotNetCore.Models; + +namespace JsonApiDotNetCore.Hooks +{ + + /// + /// The root node class of the breadth-first-traversal of entity data structures + /// as performed by the + /// + internal class RootNode : IEntityNode where TEntity : class, IIdentifiable + { + private HashSet _uniqueEntities; + public Type EntityType { get; internal set; } + public IEnumerable UniqueEntities { get { return _uniqueEntities; } } + public RelationshipProxy[] RelationshipsToNextLayer { get; private set; } + public Dictionary> PrincipalsToNextLayerByType() + { + return RelationshipsToNextLayer + .GroupBy(proxy => proxy.DependentType) + .ToDictionary(gdc => gdc.Key, gdc => gdc.ToDictionary(p => p, p => UniqueEntities)); + } + + /// + /// The current layer entities grouped by affected relationship to the next layer + /// + public Dictionary PrincipalsToNextLayer() + { + return RelationshipsToNextLayer.ToDictionary(p => p, p => UniqueEntities); + } + + /// + /// The root node does not have a parent layer and therefore does not have any relationships to any previous layer + /// + public IRelationshipsFromPreviousLayer RelationshipsFromPreviousLayer { get { return null; } } + + public RootNode(IEnumerable uniqueEntities, RelationshipProxy[] relationships) + { + EntityType = typeof(TEntity); + _uniqueEntities = new HashSet(uniqueEntities); + RelationshipsToNextLayer = relationships; + } + + /// + /// Update the internal list of affected entities. + /// + /// Updated. + public void UpdateUnique(IEnumerable updated) + { + var casted = updated.Cast().ToList(); + var intersected = _uniqueEntities.Intersect(casted, ResourceHookExecutor.Comparer).Cast(); + _uniqueEntities = new HashSet(intersected); + } + + public void Reassign(IEnumerable source = null) + { + var ids = _uniqueEntities.Select(ue => ue.StringId); + ((List)source).RemoveAll(se => !ids.Contains(se.StringId)); + } + } + +} diff --git a/src/JsonApiDotNetCore/Hooks/Traversal/TraversalHelper.cs b/src/JsonApiDotNetCore/Hooks/Traversal/TraversalHelper.cs new file mode 100644 index 0000000000..50b155daff --- /dev/null +++ b/src/JsonApiDotNetCore/Hooks/Traversal/TraversalHelper.cs @@ -0,0 +1,332 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using JsonApiDotNetCore.Extensions; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Services; +using DependentType = System.Type; +using PrincipalType = System.Type; + +namespace JsonApiDotNetCore.Hooks +{ + /// + /// A helper class used by the to traverse through + /// entity data structures (trees), allowing for a breadth-first-traversal + /// + /// It creates nodes for each layer. + /// Typically, the first layer is homogeneous (all entities have the same type), + /// and further nodes can be mixed. + /// + /// + internal class TraversalHelper + { + private readonly IResourceGraph _graph; + private readonly IJsonApiContext _context; + /// + /// Keeps track of which entities has already been traversed through, to prevent + /// infinite loops in eg cyclic data structures. + /// + private Dictionary> _processedEntities; + /// + /// A mapper from to . + /// See the latter for more details. + /// + private readonly Dictionary RelationshipProxies = new Dictionary(); + + public TraversalHelper( + IResourceGraph graph, + IJsonApiContext context) + { + _context = context; + _graph = graph; + } + + /// + /// Creates a root node for breadth-first-traversal. Note that typically, in + /// JADNC, the root layer will be homogeneous. Also, because it is the first layer, + /// there can be no relationships to previous layers, only to next layers. + /// + /// The root node. + /// Root entities. + /// The 1st type parameter. + public RootNode CreateRootNode(IEnumerable rootEntities) where TEntity : class, IIdentifiable + { + _processedEntities = new Dictionary>(); + RegisterRelationshipProxies(typeof(TEntity)); + var uniqueEntities = ProcessEntities(rootEntities); + var relationshipsToNextLayer = GetRelationships(typeof(TEntity)); + return new RootNode(uniqueEntities, relationshipsToNextLayer); + } + + /// + /// Create the first layer after the root layer (based on the root node) + /// + /// The next layer. + /// Root node. + public EntityChildLayer CreateNextLayer(IEntityNode rootNode) + { + return CreateNextLayer(new IEntityNode[] { rootNode }); + } + + /// + /// Create a next layer from any previous layer + /// + /// The next layer. + /// Nodes. + public EntityChildLayer CreateNextLayer(IEnumerable nodes) + { + /// first extract entities by parsing populated relationships in the entities + /// of previous layer + (var dependents, var principals) = ExtractEntities(nodes); + + /// group them conveniently so we can make ChildNodes of them + var dependentsGrouped = GroupByDependentTypeOfRelationship(dependents); + + /// convert the groups into child nodes + var nextNodes = dependentsGrouped.Select(entry => + { + var nextNodeType = entry.Key; + var relationshipsToPreviousLayer = entry.Value.Select(grouped => + { + var proxy = grouped.Key; + return CreateRelationsipGroupInstance(nextNodeType, proxy, grouped.Value, principals[proxy]); + }).ToList(); + + RegisterRelationshipProxies(nextNodeType); + return CreateNodeInstance(nextNodeType, GetRelationships(nextNodeType), relationshipsToPreviousLayer); + }).ToList(); + + /// wrap the child nodes in a EntityChildLayer + return new EntityChildLayer(nextNodes); + } + + + Dictionary>>> GroupByDependentTypeOfRelationship(Dictionary> relationships) + { + return relationships.GroupBy(kvp => kvp.Key.DependentType).ToDictionary(gdc => gdc.Key, gdc => gdc.ToList()); + } + + /// + /// Extracts the entities for the current layer by going through all populated relationships + /// of the (principal entities of the previous layer. + /// + (Dictionary>, Dictionary>) ExtractEntities(IEnumerable principalNodes) + { + var currentLayerEntities = new List(); + var principalsGrouped = new Dictionary>(); + var dependentsGrouped = new Dictionary>(); + + principalNodes.ForEach(n => RegisterRelationshipProxies(n.EntityType)); + + foreach (var node in principalNodes) + { + var principalEntities = node.UniqueEntities; + var relationships = node.RelationshipsToNextLayer; + foreach (IIdentifiable principalEntity in principalEntities) + { + foreach (var proxy in relationships) + { + var relationshipValue = proxy.GetValue(principalEntity); + // skip this relationship if it's not populated + if (!proxy.IsContextRelation && relationshipValue == null) continue; + if (!(relationshipValue is IEnumerable dependentEntities)) + { + // in the case of a to-one relationship, the assigned value + // will not be a list. We therefore first wrap it in a list. + var list = TypeHelper.CreateListFor(proxy.DependentType); + if (relationshipValue != null) list.Add(relationshipValue); + dependentEntities = list; + } + + var newDependentEntities = UniqueInTree(dependentEntities.Cast(), proxy.DependentType); + if (proxy.IsContextRelation || newDependentEntities.Any()) + { + currentLayerEntities.AddRange(newDependentEntities); + AddToRelationshipGroup(dependentsGrouped, proxy, newDependentEntities); // TODO check if this needs to be newDependentEntities or just dependentEntities + AddToRelationshipGroup(principalsGrouped, proxy, new IIdentifiable[] { principalEntity }); + } + } + } + } + + var processEntities = GetType().GetMethod(nameof(ProcessEntities), BindingFlags.NonPublic | BindingFlags.Instance); + foreach (var kvp in dependentsGrouped) + { + var type = kvp.Key.DependentType; + var list = kvp.Value.Cast(type); + processEntities.MakeGenericMethod(type).Invoke(this, new object[] { list }); + } + + return (principalsGrouped, dependentsGrouped); + } + + /// + /// Get all relationships known in the current tree traversal from a + /// principal type to any dependent type + /// + /// The relationships. + RelationshipProxy[] GetRelationships(PrincipalType principal) + { + return RelationshipProxies.Select(entry => entry.Value).Where(proxy => proxy.PrincipalType == principal).ToArray(); + } + + /// + /// Registers the entities as "seen" in the tree traversal, extracts any new s from it. + /// + /// The entities. + /// Incoming entities. + /// The 1st type parameter. + HashSet ProcessEntities(IEnumerable incomingEntities) where TEntity : class, IIdentifiable + { + Type type = typeof(TEntity); + var newEntities = UniqueInTree(incomingEntities, type); + RegisterProcessedEntities(newEntities, type); + return newEntities; + } + + void RegisterRelationshipProxies(DependentType type) + { + var contextEntity = _graph.GetContextEntity(type); + foreach (RelationshipAttribute attr in contextEntity.Relationships) + { + if (!attr.CanInclude) continue; + if (!RelationshipProxies.TryGetValue(attr, out RelationshipProxy proxies)) + { + DependentType dependentType = GetDependentTypeFromRelationship(attr); + var isContextRelation = _context.RelationshipsToUpdate?.ContainsKey(attr); + var proxy = new RelationshipProxy(attr, dependentType, isContextRelation != null && (bool)isContextRelation); + RelationshipProxies[attr] = proxy; + } + } + } + + + /// + /// Registers the processed entities in the dictionary grouped by type + /// + /// Entities to register + /// Entity type. + void RegisterProcessedEntities(IEnumerable entities, Type entityType) + { + var processedEntities = GetProcessedEntities(entityType); + processedEntities.UnionWith(new HashSet(entities)); + } + + /// + /// Gets the processed entities for a given type, instantiates the collection if new. + /// + /// The processed entities. + /// Entity type. + HashSet GetProcessedEntities(Type entityType) + { + if (!_processedEntities.TryGetValue(entityType, out HashSet processedEntities)) + { + processedEntities = new HashSet(); + _processedEntities[entityType] = processedEntities; + } + return processedEntities; + } + + /// + /// Using the register of processed entities, determines the unique and new + /// entities with respect to previous iterations. + /// + /// The in tree. + /// Entities. + /// Entity type. + HashSet UniqueInTree(IEnumerable entities, Type entityType) where TEntity : class, IIdentifiable + { + var newEntities = entities.Except(GetProcessedEntities(entityType), ResourceHookExecutor.Comparer).Cast(); + return new HashSet(newEntities); + } + + /// + /// Gets the type from relationship attribute. If the attribute is + /// HasManyThrough, and the jointable entity is identifiable, then the target + /// type is the joinentity instead of the righthand side, because hooks might be + /// implemented for the jointable entity. + /// + /// The target type for traversal + /// Relationship attribute + DependentType GetDependentTypeFromRelationship(RelationshipAttribute attr) + { + if (attr is HasManyThroughAttribute throughAttr && throughAttr.ThroughType.Inherits(typeof(IIdentifiable))) + { + return throughAttr.ThroughType; + } + return attr.DependentType; + } + + void AddToRelationshipGroup(Dictionary> target, RelationshipProxy proxy, IEnumerable newEntities) + { + if (!target.TryGetValue(proxy, out List entities)) + { + entities = new List(); + target[proxy] = entities; + } + entities.AddRange(newEntities); + } + + /// + /// Reflective helper method to create an instance of ; + /// + IEntityNode CreateNodeInstance(DependentType nodeType, RelationshipProxy[] relationshipsToNext, IEnumerable relationshipsFromPrev) + { + IRelationshipsFromPreviousLayer prev = CreateRelationshipsFromInstance(nodeType, relationshipsFromPrev); + return (IEntityNode)TypeHelper.CreateInstanceOfOpenType(typeof(ChildNode<>), nodeType, new object[] { relationshipsToNext, prev }); + } + + /// + /// Reflective helper method to create an instance of ; + /// + IRelationshipsFromPreviousLayer CreateRelationshipsFromInstance(DependentType nodeType, IEnumerable relationshipsFromPrev) + { + var casted = relationshipsFromPrev.Cast(relationshipsFromPrev.First().GetType()); + return (IRelationshipsFromPreviousLayer)TypeHelper.CreateInstanceOfOpenType(typeof(RelationshipsFromPreviousLayer<>), nodeType, new object[] { casted }); + } + + /// + /// Reflective helper method to create an instance of ; + /// + IRelationshipGroup CreateRelationsipGroupInstance(Type thisLayerType, RelationshipProxy proxy, List principalEntities, List dependentEntities) + { + var dependentEntitiesHashed = TypeHelper.CreateInstanceOfOpenType(typeof(HashSet<>), thisLayerType, dependentEntities.Cast(thisLayerType)); + return (IRelationshipGroup)TypeHelper.CreateInstanceOfOpenType(typeof(RelationshipGroup<>), + thisLayerType, + new object[] { proxy, new HashSet(principalEntities), dependentEntitiesHashed }); + } + } + + /// + /// A helper class that represents all entities in the current layer that + /// are being traversed for which hooks will be executed (see IResourceHookExecutor) + /// + internal class EntityChildLayer : IEnumerable + { + readonly List _collection; + + public bool AnyEntities() + { + return _collection.Any(n => n.UniqueEntities.Cast().Any()); + } + + public EntityChildLayer(List nodes) + { + _collection = nodes; + } + + public IEnumerator GetEnumerator() + { + return _collection.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} + diff --git a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs index 8a98745465..5145621058 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs @@ -6,6 +6,7 @@ using JsonApiDotNetCore.Data; using JsonApiDotNetCore.Extensions; using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Services; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; @@ -92,13 +93,11 @@ private async Task SetRelationshipsAsync(object parent, RelationshipAttribute re { if (relationship.IsHasMany) { - // TODO: need to handle the failure mode when the relationship does not implement IIdentifiable var entities = _context.Set().Where(x => relationshipIds.Contains(((IIdentifiable)x).StringId)).ToList(); relationship.SetValue(parent, entities); } else { - // TODO: need to handle the failure mode when the relationship does not implement IIdentifiable var entity = _context.Set().SingleOrDefault(x => relationshipIds.First() == ((IIdentifiable)x).StringId); relationship.SetValue(parent, entity); } diff --git a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs index 5baa9615bb..f6849b178b 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs @@ -41,12 +41,12 @@ public GenericProcessorFactory(IScopedServiceProvider serviceProvider) } public TInterface GetProcessor(Type openGenericType, Type resourceType) - => _getProcessor(openGenericType, resourceType); + => GetProcessorInternal(openGenericType, resourceType); public TInterface GetProcessor(Type openGenericType, Type resourceType, Type keyType) - => _getProcessor(openGenericType, resourceType, keyType); + => GetProcessorInternal(openGenericType, resourceType, keyType); - private TInterface _getProcessor(Type openGenericType, params Type[] types) + private TInterface GetProcessorInternal(Type openGenericType, params Type[] types) { var concreteType = openGenericType.MakeGenericType(types); diff --git a/src/JsonApiDotNetCore/Internal/IdentifiableComparer.cs b/src/JsonApiDotNetCore/Internal/IdentifiableComparer.cs new file mode 100644 index 0000000000..a830e2aec5 --- /dev/null +++ b/src/JsonApiDotNetCore/Internal/IdentifiableComparer.cs @@ -0,0 +1,23 @@ +using JsonApiDotNetCore.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace JsonApiDotNetCore.Internal +{ + /// + /// Compares `IIdentifiable` with each other based on ID + /// + /// The type to compare + public class IdentifiableComparer : IEqualityComparer + { + public bool Equals(IIdentifiable x, IIdentifiable y) + { + return x.StringId == y.StringId; + } + public int GetHashCode(IIdentifiable obj) + { + return obj.StringId.GetHashCode(); + } + } +} diff --git a/src/JsonApiDotNetCore/Internal/Query/AttrFilterQuery.cs b/src/JsonApiDotNetCore/Internal/Query/AttrFilterQuery.cs index f415ad9434..92e79a85ee 100644 --- a/src/JsonApiDotNetCore/Internal/Query/AttrFilterQuery.cs +++ b/src/JsonApiDotNetCore/Internal/Query/AttrFilterQuery.cs @@ -20,7 +20,7 @@ public AttrFilterQuery( FilteredAttribute = Attribute; } - [Obsolete("Use " + nameof(BaseAttrQuery.Attribute) + " insetad.")] + [Obsolete("Use " + nameof(BaseAttrQuery.Attribute) + " instead.")] public AttrAttribute FilteredAttribute { get; set; } } } diff --git a/src/JsonApiDotNetCore/Internal/Query/BaseAttrQuery.cs b/src/JsonApiDotNetCore/Internal/Query/BaseAttrQuery.cs index d0cde0495f..e7eeb83e68 100644 --- a/src/JsonApiDotNetCore/Internal/Query/BaseAttrQuery.cs +++ b/src/JsonApiDotNetCore/Internal/Query/BaseAttrQuery.cs @@ -63,7 +63,7 @@ private RelationshipAttribute GetRelationship(string propertyName) private AttrAttribute GetAttribute(RelationshipAttribute relationship, string attribute) { - var relatedContextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(relationship.Type); + var relatedContextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(relationship.DependentType); return relatedContextEntity.Attributes .FirstOrDefault(a => a.Is(attribute)); } diff --git a/src/JsonApiDotNetCore/Internal/ResourceGraph.cs b/src/JsonApiDotNetCore/Internal/ResourceGraph.cs index a7afe98398..a7bd486a65 100644 --- a/src/JsonApiDotNetCore/Internal/ResourceGraph.cs +++ b/src/JsonApiDotNetCore/Internal/ResourceGraph.cs @@ -69,6 +69,7 @@ public interface IResourceGraph /// /// The internal attribute name for a . string GetPublicAttributeName(string internalAttributeName); + RelationshipAttribute GetInverseRelationship(RelationshipAttribute relationship); /// /// Was built against an EntityFrameworkCore DbContext ? @@ -177,5 +178,11 @@ public string GetPublicAttributeName(string internalAttributeName) .SingleOrDefault(a => a.InternalAttributeName == internalAttributeName)? .PublicAttributeName; } + + public RelationshipAttribute GetInverseRelationship(RelationshipAttribute relationship) + { + if (relationship.InverseNavigation == null) return null; + return GetContextEntity(relationship.DependentType).Relationships.SingleOrDefault(r => r.InternalRelationshipName == relationship.InverseNavigation); + } } } diff --git a/src/JsonApiDotNetCore/Internal/TypeHelper.cs b/src/JsonApiDotNetCore/Internal/TypeHelper.cs index 75ae84d380..7677862efb 100644 --- a/src/JsonApiDotNetCore/Internal/TypeHelper.cs +++ b/src/JsonApiDotNetCore/Internal/TypeHelper.cs @@ -85,8 +85,7 @@ public static Type GetTypeOfList(Type type) /// Collection of concrete type public static IList ConvertListType(IEnumerable values, Type type) { - var listType = typeof(List<>).MakeGenericType(type); - IList list = (IList)Activator.CreateInstance(listType); + var list = CreateListFor(type); foreach (var value in values) { list.Add(ConvertType(value, type)); @@ -94,5 +93,73 @@ public static IList ConvertListType(IEnumerable values, Type type) return list; } + + /// + /// Creates an instance of the specified generic type + /// + /// The instance of the parameterized generic type + /// Generic type parameters to be used in open type. + /// Constructor arguments to be provided in instantiation. + /// Open generic type + public static object CreateInstanceOfOpenType(Type openType, Type[] parameters, params object[] constructorArguments) + { + var parameterizedType = openType.MakeGenericType(parameters); + return Activator.CreateInstance(parameterizedType, constructorArguments); + } + + /// + /// Use this overload if you need to instantiate a type that has a internal constructor + /// + public static object CreateInstanceOfOpenType(Type openType, Type[] parameters, bool hasInternalConstructor, params object[] constructorArguments) + { + if (!hasInternalConstructor) return CreateInstanceOfOpenType(openType, parameters, constructorArguments); + var parameterizedType = openType.MakeGenericType(parameters); + // note that if for whatever reason the constructor of AffectedResource is set from + // internal to public, this will throw an error, as it is looking for a no + return Activator.CreateInstance(parameterizedType, BindingFlags.NonPublic | BindingFlags.Instance, null, constructorArguments, null); + } + + /// + /// Creates an instance of the specified generic type + /// + /// The instance of the parameterized generic type + /// Generic type parameter to be used in open type. + /// Constructor arguments to be provided in instantiation. + /// Open generic type + public static object CreateInstanceOfOpenType(Type openType, Type parameter, params object[] constructorArguments) + { + return CreateInstanceOfOpenType(openType, new Type[] { parameter }, constructorArguments); + } + + /// + /// Use this overload if you need to instantiate a type that has a internal constructor + /// + public static object CreateInstanceOfOpenType(Type openType, Type parameter, bool hasInternalConstructor, params object[] constructorArguments) + { + return CreateInstanceOfOpenType(openType, new Type[] { parameter }, hasInternalConstructor, constructorArguments); + + } + + /// + /// Reflectively instantiates a list of a certain type. + /// + /// The list of the target type + /// The target type + public static IList CreateListFor(Type type) + { + IList list = (IList)CreateInstanceOfOpenType(typeof(List<>), type ); + return list; + + } + + /// + /// Gets the generic argument T of List{T} + /// + /// The type of the list + /// The list to be inspected/param> + public static Type GetListInnerType(IEnumerable list) + { + return list.GetType().GetGenericArguments()[0]; + } } } diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj index c28d89d951..dcfe030039 100644 --- a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj @@ -44,5 +44,7 @@ - + + + diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.sln b/src/JsonApiDotNetCore/JsonApiDotNetCore.sln new file mode 100644 index 0000000000..58b08eb568 --- /dev/null +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonApiDotNetCore", "JsonApiDotNetCore.csproj", "{C8E2AE2E-80E2-408E-89FF-F66BA720F879}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Any CPU = Release|Any CPU + Debug|Any CPU = Debug|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C8E2AE2E-80E2-408E-89FF-F66BA720F879}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8E2AE2E-80E2-408E-89FF-F66BA720F879}.Release|Any CPU.Build.0 = Release|Any CPU + {C8E2AE2E-80E2-408E-89FF-F66BA720F879}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8E2AE2E-80E2-408E-89FF-F66BA720F879}.Debug|Any CPU.Build.0 = Debug|Any CPU + EndGlobalSection +EndGlobal diff --git a/src/JsonApiDotNetCore/Models/HasOneAttribute.cs b/src/JsonApiDotNetCore/Models/HasOneAttribute.cs index d46d5adfdf..54a024e703 100644 --- a/src/JsonApiDotNetCore/Models/HasOneAttribute.cs +++ b/src/JsonApiDotNetCore/Models/HasOneAttribute.cs @@ -29,6 +29,7 @@ public class HasOneAttribute : RelationshipAttribute /// /// public HasOneAttribute(string publicName = null, Link documentLinks = Link.All, bool canInclude = true, string withForeignKey = null, string mappedBy = null, string inverseNavigationProperty = null) + : base(publicName, documentLinks, canInclude, mappedBy) { _explicitIdentifiablePropertyName = withForeignKey; diff --git a/src/JsonApiDotNetCore/Models/RelationshipAttribute.cs b/src/JsonApiDotNetCore/Models/RelationshipAttribute.cs index 1c484889c3..3bd44f5030 100644 --- a/src/JsonApiDotNetCore/Models/RelationshipAttribute.cs +++ b/src/JsonApiDotNetCore/Models/RelationshipAttribute.cs @@ -1,5 +1,5 @@ using System; -using System.Reflection; +using System.Runtime.CompilerServices; using JsonApiDotNetCore.Extensions; namespace JsonApiDotNetCore.Models @@ -28,7 +28,28 @@ protected RelationshipAttribute(string publicName, Link documentLinks, bool canI /// public List<Tag> Tags { get; set; } // Type => Tag /// /// - public Type Type { get; internal set; } + [Obsolete("Use property DependentType")] + public Type Type { get { return DependentType; } internal set { DependentType = value; } } + + /// + /// The related entity type. This does not necessarily match the navigation property type. + /// In the case of a HasMany relationship, this value will be the generic argument type. + /// + /// The technical language as used in EF Core is used here (dependent vs principal). + /// + /// + /// + /// + /// public List<Tag> Tags { get; set; } // Type => Tag + /// + /// + public Type DependentType { get; internal set; } + + /// + /// The parent entity type. The technical language as used in EF Core is used here (dependent vs principal). + /// + public Type PrincipalType { get; internal set; } + public bool IsHasMany => GetType() == typeof(HasManyAttribute) || GetType().Inherits(typeof(HasManyAttribute)); public bool IsHasOne => GetType() == typeof(HasOneAttribute); public Link DocumentLinks { get; } = Link.All; @@ -75,7 +96,14 @@ public override bool Equals(object obj) { return false; } - return IsHasMany == attr.IsHasMany && PublicRelationshipName.Equals(attr.PublicRelationshipName); + bool equalRelationshipName = PublicRelationshipName.Equals(attr.PublicRelationshipName); + + bool equalPrincipalType = true; + if (PrincipalType != null) + { + equalPrincipalType = PrincipalType.Equals(attr.PrincipalType); + } + return IsHasMany == attr.IsHasMany && equalRelationshipName && equalPrincipalType; } /// diff --git a/src/JsonApiDotNetCore/Models/ResourceDefinition.cs b/src/JsonApiDotNetCore/Models/ResourceDefinition.cs index 77461aba42..c8fbec627d 100644 --- a/src/JsonApiDotNetCore/Models/ResourceDefinition.cs +++ b/src/JsonApiDotNetCore/Models/ResourceDefinition.cs @@ -1,5 +1,6 @@ using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Internal.Query; +using JsonApiDotNetCore.Hooks; using System; using System.Collections.Generic; using System.Linq; @@ -8,11 +9,13 @@ namespace JsonApiDotNetCore.Models { + public interface IResourceDefinition { List GetOutputAttrs(object instance); } + /// /// exposes developer friendly hooks into how their resources are exposed. /// It is intended to improve the experience and reduce boilerplate for commonly required features. @@ -20,19 +23,17 @@ public interface IResourceDefinition /// service and repository layers. /// /// The resource type - public class ResourceDefinition : IResourceDefinition where T : class, IIdentifiable + public class ResourceDefinition : IResourceDefinition, IResourceHookContainer where T : class, IIdentifiable { - private readonly IResourceGraph _graph; private readonly ContextEntity _contextEntity; internal readonly bool _instanceAttrsAreSpecified; private bool _requestCachedAttrsHaveBeenLoaded = false; private List _requestCachedAttrs; - public ResourceDefinition() + public ResourceDefinition(IResourceGraph graph) { - _graph = ResourceGraph.Instance; - _contextEntity = ResourceGraph.Instance.GetContextEntity(typeof(T)); + _contextEntity = graph.GetContextEntity(typeof(T)); _instanceAttrsAreSpecified = InstanceOutputAttrsAreSpecified(); } @@ -49,11 +50,17 @@ private bool InstanceOutputAttrsAreSpecified() .FirstOrDefault(); var declaringType = instanceMethod?.DeclaringType; return declaringType == derivedType; - } + } - // TODO: need to investigate options for caching these + /// + /// Remove an attribute + /// + /// the filter to execute + /// @TODO + /// protected List Remove(Expression> filter, List from = null) { + //@TODO: need to investigate options for caching these from = from ?? _contextEntity.Attributes; // model => model.Attribute @@ -157,6 +164,32 @@ private List GetOutputAttrs() /// public virtual QueryFilters GetQueryFilters() => null; + /// + public virtual void AfterCreate(HashSet entities, ResourcePipeline pipeline) { } + /// + public virtual void AfterRead(HashSet entities, ResourcePipeline pipeline, bool isIncluded = false) { } + /// + public virtual void AfterUpdate(HashSet entities, ResourcePipeline pipeline) { } + /// + public virtual void AfterDelete(HashSet entities, ResourcePipeline pipeline, bool succeeded) { } + /// + public virtual void AfterUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) { } + /// + public virtual IEnumerable BeforeCreate(IAffectedResources affected, ResourcePipeline pipeline) { return affected; } + /// + public virtual void BeforeRead(ResourcePipeline pipeline, bool isIncluded = false, string stringId = null) { } + /// + public virtual IEnumerable BeforeUpdate(IAffectedResourcesDiff ResourceDiff, ResourcePipeline pipeline) { return ResourceDiff; } + /// + public virtual IEnumerable BeforeDelete(IAffectedResources affected, ResourcePipeline pipeline) { return affected; } + /// + public virtual IEnumerable BeforeUpdateRelationship(HashSet ids, IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) { return ids; } + /// + public virtual void BeforeImplicitUpdateRelationship(IAffectedRelationships resourcesByRelationship, ResourcePipeline pipeline) { } + /// + public virtual IEnumerable OnReturn(HashSet entities, ResourcePipeline pipeline) { return entities; } + + /// /// This is an alias type intended to simplify the implementation's /// method signature. @@ -179,20 +212,20 @@ public class QueryFilters : Dictionary, FilterQuery, /// }; /// /// - protected virtual PropertySortOrder GetDefaultSortOrder() => null; + public virtual PropertySortOrder GetDefaultSortOrder() => null; - internal List<(AttrAttribute, SortDirection)> DefaultSort() + public List<(AttrAttribute, SortDirection)> DefaultSort() { var defaultSortOrder = GetDefaultSortOrder(); - if(defaultSortOrder != null && defaultSortOrder.Count > 0) + if (defaultSortOrder != null && defaultSortOrder.Count > 0) { var order = new List<(AttrAttribute, SortDirection)>(); - foreach(var sortProp in defaultSortOrder) + foreach (var sortProp in defaultSortOrder) { // TODO: error handling, log or throw? if (sortProp.Item1.Body is MemberExpression memberExpression) order.Add( - (_contextEntity.Attributes.SingleOrDefault(a => a.InternalAttributeName != memberExpression.Member.Name), + (_contextEntity.Attributes.SingleOrDefault(a => a.InternalAttributeName != memberExpression.Member.Name), sortProp.Item2) ); } diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index 5bd13a4aef..df36966b36 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -228,8 +228,10 @@ private object SetHasOneRelationship(object entity, if (included != null) { var navigationPropertyValue = attr.GetValue(entity); - var resourceGraphEntity = _jsonApiContext.ResourceGraph.GetContextEntity(attr.Type); - if (navigationPropertyValue != null && resourceGraphEntity != null) + + var resourceGraphEntity = _jsonApiContext.ResourceGraph.GetContextEntity(attr.DependentType); + if(navigationPropertyValue != null && resourceGraphEntity != null) + { var includedResource = included.SingleOrDefault(r => r.Type == rio.Type && r.Id == rio.Id); if (includedResource != null) @@ -308,7 +310,7 @@ private object SetHasManyRelationship(object entity, return instance; }); - var convertedCollection = TypeHelper.ConvertCollection(relatedResources, attr.Type); + var convertedCollection = TypeHelper.ConvertCollection(relatedResources, attr.DependentType); attr.SetValue(entity, convertedCollection); /// todo: as a part of the process of decoupling JADNC (specifically @@ -325,7 +327,7 @@ private object SetHasManyRelationship(object entity, private IIdentifiable GetIncludedRelationship(ResourceIdentifierObject relatedResourceIdentifier, List includedResources, RelationshipAttribute relationshipAttr) { // at this point we can be sure the relationshipAttr.Type is IIdentifiable because we were able to successfully build the ResourceGraph - var relatedInstance = relationshipAttr.Type.New(); + var relatedInstance = relationshipAttr.DependentType.New(); relatedInstance.StringId = relatedResourceIdentifier.Id; // can't provide any more data other than the rio since it is not contained in the included section @@ -336,9 +338,9 @@ private IIdentifiable GetIncludedRelationship(ResourceIdentifierObject relatedRe if (includedResource == null) return relatedInstance; - var contextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(relationshipAttr.Type); + var contextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(relationshipAttr.DependentType); if (contextEntity == null) - throw new JsonApiException(400, $"Included type '{relationshipAttr.Type}' is not a registered json:api resource."); + throw new JsonApiException(400, $"Included type '{relationshipAttr.DependentType}' is not a registered json:api resource."); SetEntityAttributes(relatedInstance, contextEntity, includedResource.Attributes); diff --git a/src/JsonApiDotNetCore/Services/EntityResourceService.cs b/src/JsonApiDotNetCore/Services/EntityResourceService.cs index b73866c4ed..9a06577386 100644 --- a/src/JsonApiDotNetCore/Services/EntityResourceService.cs +++ b/src/JsonApiDotNetCore/Services/EntityResourceService.cs @@ -1,6 +1,7 @@ using JsonApiDotNetCore.Data; using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Hooks; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; @@ -16,8 +17,9 @@ public class EntityResourceService : EntityResourceService entityRepository, - ILoggerFactory loggerFactory = null) : - base(jsonApiContext, entityRepository, loggerFactory) + ILoggerFactory loggerFactory = null, + IResourceHookExecutor hookExecutor = null) : + base(jsonApiContext, entityRepository, loggerFactory, hookExecutor) { } } @@ -28,8 +30,9 @@ public class EntityResourceService : EntityResourceService entityRepository, - ILoggerFactory loggerFactory = null) : - base(jsonApiContext, entityRepository, loggerFactory) + ILoggerFactory loggerFactory = null, + IResourceHookExecutor hookExecutor = null) : + base(jsonApiContext, entityRepository, hookExecutor, loggerFactory) { } } @@ -42,39 +45,55 @@ public class EntityResourceService : private readonly IEntityRepository _entities; private readonly ILogger _logger; private readonly IResourceMapper _mapper; + private readonly IResourceHookExecutor _hookExecutor; + public EntityResourceService( - IJsonApiContext jsonApiContext, - IEntityRepository entityRepository, - ILoggerFactory loggerFactory = null) + IJsonApiContext jsonApiContext, + IEntityRepository entityRepository, + IResourceHookExecutor hookExecutor = null, + IResourceMapper mapper = null, + ILoggerFactory loggerFactory = null) { - // no mapper provided, TResource & TEntity must be the same type - if (typeof(TResource) != typeof(TEntity)) + _jsonApiContext = jsonApiContext; + _entities = entityRepository; + + if (mapper == null && typeof(TResource) != typeof(TEntity)) { throw new InvalidOperationException("Resource and Entity types are NOT the same. Please provide a mapper."); } - - _jsonApiContext = jsonApiContext; - _entities = entityRepository; + _hookExecutor = hookExecutor; + _mapper = mapper; _logger = loggerFactory?.CreateLogger>(); } + + public EntityResourceService( + IJsonApiContext jsonApiContext, + IEntityRepository entityRepository, + IResourceHookExecutor hookExecutor, + ILoggerFactory loggerFactory = null) : this(jsonApiContext, entityRepository, hookExecutor: hookExecutor, mapper: null, loggerFactory: null) + { } + + public EntityResourceService( + IJsonApiContext jsonApiContext, + IEntityRepository entityRepository, + ILoggerFactory loggerFactory = null) : this(jsonApiContext, entityRepository, hookExecutor: null, mapper: null, loggerFactory: loggerFactory) + { } + + [Obsolete("Use ctor with signature (jsonApiContext, entityRepository, hookExecutor = null, mapper = null, loggerFactory = null")] public EntityResourceService( IJsonApiContext jsonApiContext, IEntityRepository entityRepository, ILoggerFactory loggerFactory, - IResourceMapper mapper) - { - _jsonApiContext = jsonApiContext; - _entities = entityRepository; - _logger = loggerFactory.CreateLogger>(); - _mapper = mapper; - } + IResourceMapper mapper ) : this(jsonApiContext, entityRepository, hookExecutor: null, mapper: mapper, loggerFactory: loggerFactory) + { } public virtual async Task CreateAsync(TResource resource) { var entity = MapIn(resource); + entity = IsNull(_hookExecutor) ? entity : _hookExecutor.BeforeCreate(AsList(entity), ResourcePipeline.Post).SingleOrDefault(); entity = await _entities.CreateAsync(entity); // this ensures relationships get reloaded from the database if they have @@ -82,34 +101,54 @@ public virtual async Task CreateAsync(TResource resource) // https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/343 if (ShouldIncludeRelationships()) { - if(_entities is IEntityFrameworkRepository efRepository) + if (_entities is IEntityFrameworkRepository efRepository) efRepository.DetachRelationshipPointers(entity); - return await GetWithRelationshipsAsync(entity.Id); - } + entity = await GetWithRelationshipsAsync(entity.Id); + } + if (!IsNull(_hookExecutor, entity)) + { + _hookExecutor.AfterCreate(AsList(entity), ResourcePipeline.Post); + entity = _hookExecutor.OnReturn(AsList(entity), ResourcePipeline.Get).SingleOrDefault(); + } return MapOut(entity); } - public virtual async Task DeleteAsync(TId id) { - return await _entities.DeleteAsync(id); + var entity = (TEntity)Activator.CreateInstance(typeof(TEntity)); + entity.Id = id; + if (!IsNull(_hookExecutor, entity)) _hookExecutor.BeforeDelete(AsList(entity), ResourcePipeline.Delete); + var succeeded = await _entities.DeleteAsync(entity.Id); + if (!IsNull(_hookExecutor, entity)) _hookExecutor.AfterDelete(AsList(entity), ResourcePipeline.Delete, succeeded); + return succeeded; } public virtual async Task> GetAsync() { + _hookExecutor?.BeforeRead(ResourcePipeline.Get); var entities = _entities.Get(); entities = ApplySortAndFilterQuery(entities); if (ShouldIncludeRelationships()) entities = IncludeRelationships(entities, _jsonApiContext.QuerySet.IncludedRelationships); - + if (_jsonApiContext.Options.IncludeTotalRecordCount) _jsonApiContext.PageManager.TotalRecords = await _entities.CountAsync(entities); entities = _entities.Select(entities, _jsonApiContext.QuerySet?.Fields); + if (!IsNull(_hookExecutor, entities)) + { + var result = entities.ToList(); + _hookExecutor.AfterRead(result, ResourcePipeline.Get); + entities = _hookExecutor.OnReturn(result, ResourcePipeline.Get).AsQueryable(); + } + + if (_jsonApiContext.Options.IncludeTotalRecordCount) + _jsonApiContext.PageManager.TotalRecords = await _entities.CountAsync(entities); + // pagination should be done last since it will execute the query var pagedEntities = await ApplyPageQueryAsync(entities); return pagedEntities; @@ -117,20 +156,40 @@ public virtual async Task> GetAsync() public virtual async Task GetAsync(TId id) { + var pipeline = ResourcePipeline.GetSingle; + _hookExecutor?.BeforeRead(pipeline, id.ToString()); + TEntity entity; if (ShouldIncludeRelationships()) - return await GetWithRelationshipsAsync(id); - - TEntity entity = await _entities.GetAsync(id); - + { + entity = await GetWithRelationshipsAsync(id); + } + else + { + entity = await _entities.GetAsync(id); + } + if(!IsNull(_hookExecutor, entity)) + { + _hookExecutor.AfterRead(AsList(entity), pipeline); + entity = _hookExecutor.OnReturn(AsList(entity), pipeline).SingleOrDefault(); + } return MapOut(entity); + } - public virtual async Task GetRelationshipsAsync(TId id, string relationshipName) - => await GetRelationshipAsync(id, relationshipName); + // triggered by GET /articles/1/relationships/{relationshipName} + public virtual async Task GetRelationshipsAsync(TId id, string relationshipName) => await GetRelationshipAsync(id, relationshipName); + // triggered by GET /articles/1/{relationshipName} public virtual async Task GetRelationshipAsync(TId id, string relationshipName) { + + _hookExecutor?.BeforeRead(ResourcePipeline.GetRelationship, id.ToString()); var entity = await _entities.GetAndIncludeAsync(id, relationshipName); + if (!IsNull(_hookExecutor, entity)) + { + _hookExecutor.AfterRead(AsList(entity), ResourcePipeline.GetRelationship); + entity = _hookExecutor.OnReturn(AsList(entity), ResourcePipeline.GetRelationship).SingleOrDefault(); + } // TODO: it would be better if we could distinguish whether or not the relationship was not found, // vs the relationship not being set on the instance of T @@ -154,11 +213,18 @@ public virtual async Task UpdateAsync(TId id, TResource resource) { var entity = MapIn(resource); + entity = IsNull(_hookExecutor) ? entity : _hookExecutor.BeforeUpdate(AsList(entity), ResourcePipeline.Patch).SingleOrDefault(); entity = await _entities.UpdateAsync(entity); + if (!IsNull(_hookExecutor, entity)) + { + _hookExecutor.AfterUpdate(AsList(entity), ResourcePipeline.Patch); + entity = _hookExecutor.OnReturn(AsList(entity), ResourcePipeline.Patch).SingleOrDefault(); + } return MapOut(entity); } + // triggered by PATCH /articles/1/relationships/{relationshipName} public virtual async Task UpdateRelationshipsAsync(TId id, string relationshipName, List relationships) { var entity = await _entities.GetAndIncludeAsync(id, relationshipName); @@ -172,7 +238,7 @@ public virtual async Task UpdateRelationshipsAsync(TId id, string relationshipNa .Relationships .FirstOrDefault(r => r.Is(relationshipName)); - var relationshipType = relationship.Type; + var relationshipType = relationship.DependentType; // update relationship type with internalname var entityProperty = typeof(TEntity).GetProperty(relationship.InternalRelationshipName); @@ -182,13 +248,16 @@ public virtual async Task UpdateRelationshipsAsync(TId id, string relationshipNa $"could not be found on entity."); } + /// Why are we changing this value on the attribute and setting it back below? This feels very hacky relationship.Type = relationship.IsHasMany ? entityProperty.PropertyType.GetGenericArguments()[0] : entityProperty.PropertyType; var relationshipIds = relationships.Select(r => r?.Id?.ToString()); + entity = IsNull(_hookExecutor) ? entity : _hookExecutor.BeforeUpdate(AsList(entity), ResourcePipeline.PatchRelationship).SingleOrDefault(); await _entities.UpdateRelationshipsAsync(entity, relationship, relationshipIds); + if (!IsNull(_hookExecutor, entity)) _hookExecutor.AfterUpdate(AsList(entity), ResourcePipeline.PatchRelationship); relationship.Type = relationshipType; } @@ -240,7 +309,7 @@ protected virtual IQueryable IncludeRelationships(IQueryable e return entities; } - private async Task GetWithRelationshipsAsync(TId id) + private async Task GetWithRelationshipsAsync(TId id) { var query = _entities.Select(_entities.Get(), _jsonApiContext.QuerySet?.Fields).Where(e => e.Id.Equals(id)); @@ -256,7 +325,17 @@ private async Task GetWithRelationshipsAsync(TId id) else value = await _entities.FirstOrDefaultAsync(query); - return MapOut(value); + return value; + } + + + private bool IsNull(params object[] values) + { + foreach (var val in values) + { + if (val == null) return true; + } + return false; } private bool ShouldIncludeRelationships() @@ -277,5 +356,10 @@ private TEntity MapIn(TResource resource) => (typeof(TResource) == typeof(TEntity)) ? resource as TEntity : _mapper.Map(resource); + + private List AsList(TEntity entity) + { + return new List { entity }; + } } } diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs index 0551b0a3cd..9415554bcb 100644 --- a/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs @@ -135,7 +135,7 @@ private async Task GetRelationshipAsync(Operation operation) // TODO: need a better way to get the ContextEntity from a relationship name // when no generic parameter is available var relationshipType = _resourceGraph.GetContextEntity(operation.GetResourceTypeName()) - .Relationships.Single(r => r.Is(operation.Ref.Relationship)).Type; + .Relationships.Single(r => r.Is(operation.Ref.Relationship)).DependentType; var relatedContextEntity = _jsonApiContext.ResourceGraph.GetContextEntity(relationshipType); diff --git a/src/JsonApiDotNetCore/Services/QueryParser.cs b/src/JsonApiDotNetCore/Services/QueryParser.cs index cd839ffa73..5787ab722f 100644 --- a/src/JsonApiDotNetCore/Services/QueryParser.cs +++ b/src/JsonApiDotNetCore/Services/QueryParser.cs @@ -193,10 +193,10 @@ protected virtual List ParseFieldsQuery(string key, string value) { if (relationship != default) { - var relationProperty = _options.ResourceGraph.GetContextEntity(relationship.Type); + var relationProperty = _options.ResourceGraph.GetContextEntity(relationship.DependentType); var attr = relationProperty.Attributes.SingleOrDefault(a => a.Is(field)); if(attr == null) - throw new JsonApiException(400, $"'{relationship.Type.Name}' does not contain '{field}'."); + throw new JsonApiException(400, $"'{relationship.DependentType.Name}' does not contain '{field}'."); // e.g. "Owner.Name" includedFields.Add(relationship.InternalRelationshipName + "." + attr.InternalAttributeName); diff --git a/test/DiscoveryTests/DiscoveryTests.csproj b/test/DiscoveryTests/DiscoveryTests.csproj index 2846b365e5..eeb13485f3 100644 --- a/test/DiscoveryTests/DiscoveryTests.csproj +++ b/test/DiscoveryTests/DiscoveryTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/test/JsonApiDotNetCoreExampleTests/Acceptance/ResourceDefinitions/OutputAttrs_Tests.cs b/test/JsonApiDotNetCoreExampleTests/Acceptance/ResourceDefinitions/OutputAttrs_Tests.cs deleted file mode 100644 index c5a6c054a4..0000000000 --- a/test/JsonApiDotNetCoreExampleTests/Acceptance/ResourceDefinitions/OutputAttrs_Tests.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using Bogus; -using JsonApiDotNetCore.Models; -using JsonApiDotNetCore.Serialization; -using JsonApiDotNetCoreExample.Data; -using JsonApiDotNetCoreExample.Models; -using Microsoft.EntityFrameworkCore; -using Newtonsoft.Json; -using Xunit; - -namespace JsonApiDotNetCoreExampleTests.Acceptance -{ - [Collection("WebHostCollection")] - public class OutputAttrs_Tests - { - private TestFixture _fixture; - private AppDbContext _context; - private Faker _userFaker; - - public OutputAttrs_Tests(TestFixture fixture) - { - _fixture = fixture; - _context = fixture.GetService(); - _userFaker = new Faker() - .RuleFor(u => u.Username, f => f.Internet.UserName()) - .RuleFor(u => u.Password, f => f.Internet.Password()); - } - - [Fact] - public async Task Password_Is_Not_Included_In_Response_Payload() - { - // Arrange - var user = _userFaker.Generate(); - _context.Users.Add(user); - _context.SaveChanges(); - - var httpMethod = new HttpMethod("GET"); - var route = $"/api/v1/users/{user.Id}"; - var request = new HttpRequestMessage(httpMethod, route); - - // Act - var response = await _fixture.Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var body = await response.Content.ReadAsStringAsync(); - var document = JsonConvert.DeserializeObject(body); - Assert.False(document.Data.Attributes.ContainsKey("password")); - } - - [Fact] - public async Task Can_Create_User_With_Password() - { - // Arrange - var user = _userFaker.Generate(); - var content = new - { - data = new - { - type = "users", - attributes = new Dictionary() - { - { "username", user.Username }, - { "password", user.Password }, - } - } - }; - - var httpMethod = new HttpMethod("POST"); - var route = $"/api/v1/users"; - - var request = new HttpRequestMessage(httpMethod, route); - request.Content = new StringContent(JsonConvert.SerializeObject(content)); - request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); - - // Act - var response = await _fixture.Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.Created, response.StatusCode); - - // response assertions - var body = await response.Content.ReadAsStringAsync(); - var deserializedBody = (User)_fixture.GetService().Deserialize(body); - var document = JsonConvert.DeserializeObject(body); - Assert.False(document.Data.Attributes.ContainsKey("password")); - Assert.Equal(user.Username, document.Data.Attributes["username"]); - - // db assertions - var dbUser = await _context.Users.FindAsync(deserializedBody.Id); - Assert.Equal(user.Username, dbUser.Username); - Assert.Equal(user.Password, dbUser.Password); - } - - [Fact] - public async Task Can_Update_User_Password() - { - // Arrange - var user = _userFaker.Generate(); - _context.Users.Add(user); - _context.SaveChanges(); - - var newPassword = _userFaker.Generate().Password; - - var content = new - { - data = new - { - type = "users", - id = user.Id, - attributes = new Dictionary() - { - { "password", newPassword }, - } - } - }; - - var httpMethod = new HttpMethod("PATCH"); - var route = $"/api/v1/users/{user.Id}"; - - var request = new HttpRequestMessage(httpMethod, route); - request.Content = new StringContent(JsonConvert.SerializeObject(content)); - request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); - - // Act - var response = await _fixture.Client.SendAsync(request); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - // response assertions - var body = await response.Content.ReadAsStringAsync(); - var deserializedBody = (User)_fixture.GetService().Deserialize(body); - var document = JsonConvert.DeserializeObject(body); - Assert.False(document.Data.Attributes.ContainsKey("password")); - Assert.Equal(user.Username, document.Data.Attributes["username"]); - - // db assertions - var dbUser = _context.Users.AsNoTracking().Single(u => u.Id == user.Id); - Assert.Equal(newPassword, dbUser.Password); - } - } -} diff --git a/test/JsonApiDotNetCoreExampleTests/Acceptance/ResourceDefinitions/ResourceDefinitionTests.cs b/test/JsonApiDotNetCoreExampleTests/Acceptance/ResourceDefinitions/ResourceDefinitionTests.cs new file mode 100644 index 0000000000..88b98f982a --- /dev/null +++ b/test/JsonApiDotNetCoreExampleTests/Acceptance/ResourceDefinitions/ResourceDefinitionTests.cs @@ -0,0 +1,596 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; +using Bogus; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Serialization; +using JsonApiDotNetCoreExample.Data; +using JsonApiDotNetCoreExample.Models; +using Microsoft.EntityFrameworkCore; +using Newtonsoft.Json; +using Xunit; +using Person = JsonApiDotNetCoreExample.Models.Person; + +namespace JsonApiDotNetCoreExampleTests.Acceptance +{ + [Collection("WebHostCollection")] + public class ResourceDefinitionTests + { + private TestFixture _fixture; + private AppDbContext _context; + private Faker _userFaker; + private Faker _todoItemFaker; + private Faker _personFaker; + private static readonly Faker
_articleFaker = new Faker
() + .RuleFor(a => a.Name, f => f.Random.AlphaNumeric(10)) + .RuleFor(a => a.Author, f => new Author()); + + private static readonly Faker _tagFaker = new Faker().RuleFor(a => a.Name, f => f.Random.AlphaNumeric(10)); + public ResourceDefinitionTests(TestFixture fixture) + { + _fixture = fixture; + _context = fixture.GetService(); + _userFaker = new Faker() + .RuleFor(u => u.Username, f => f.Internet.UserName()) + .RuleFor(u => u.Password, f => f.Internet.Password()); + _todoItemFaker = new Faker() + .RuleFor(t => t.Description, f => f.Lorem.Sentence()) + .RuleFor(t => t.Ordinal, f => f.Random.Number()) + .RuleFor(t => t.CreatedDate, f => f.Date.Past()); + _personFaker = new Faker() + .RuleFor(p => p.FirstName, f => f.Name.FirstName()) + .RuleFor(p => p.LastName, f => f.Name.LastName()); + } + + [Fact] + public async Task Password_Is_Not_Included_In_Response_Payload() + { + // Arrange + var user = _userFaker.Generate(); + _context.Users.Add(user); + _context.SaveChanges(); + + var httpMethod = new HttpMethod("GET"); + var route = $"/api/v1/users/{user.Id}"; + var request = new HttpRequestMessage(httpMethod, route); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + var body = await response.Content.ReadAsStringAsync(); + var document = JsonConvert.DeserializeObject(body); + Assert.False(document.Data.Attributes.ContainsKey("password")); + } + + [Fact] + public async Task Can_Create_User_With_Password() + { + // Arrange + var user = _userFaker.Generate(); + var content = new + { + data = new + { + type = "users", + attributes = new Dictionary() + { + { "username", user.Username }, + { "password", user.Password }, + } + } + }; + + var httpMethod = new HttpMethod("POST"); + var route = $"/api/v1/users"; + + var request = new HttpRequestMessage(httpMethod, route); + request.Content = new StringContent(JsonConvert.SerializeObject(content)); + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + Assert.Equal(HttpStatusCode.Created, response.StatusCode); + + // response assertions + var body = await response.Content.ReadAsStringAsync(); + var deserializedBody = (User)_fixture.GetService().Deserialize(body); + var document = JsonConvert.DeserializeObject(body); + Assert.False(document.Data.Attributes.ContainsKey("password")); + Assert.Equal(user.Username, document.Data.Attributes["username"]); + + // db assertions + var dbUser = await _context.Users.FindAsync(deserializedBody.Id); + Assert.Equal(user.Username, dbUser.Username); + Assert.Equal(user.Password, dbUser.Password); + } + + [Fact] + public async Task Can_Update_User_Password() + { + // Arrange + var user = _userFaker.Generate(); + _context.Users.Add(user); + _context.SaveChanges(); + + var newPassword = _userFaker.Generate().Password; + + var content = new + { + data = new + { + type = "users", + id = user.Id, + attributes = new Dictionary() + { + { "password", newPassword }, + } + } + }; + + var httpMethod = new HttpMethod("PATCH"); + var route = $"/api/v1/users/{user.Id}"; + + var request = new HttpRequestMessage(httpMethod, route); + request.Content = new StringContent(JsonConvert.SerializeObject(content)); + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + // response assertions + var body = await response.Content.ReadAsStringAsync(); + var deserializedBody = (User)_fixture.GetService().Deserialize(body); + var document = JsonConvert.DeserializeObject(body); + Assert.False(document.Data.Attributes.ContainsKey("password")); + Assert.Equal(user.Username, document.Data.Attributes["username"]); + + // db assertions + var dbUser = _context.Users.AsNoTracking().Single(u => u.Id == user.Id); + Assert.Equal(newPassword, dbUser.Password); + } + + [Fact] + public async Task Unauthorized_TodoItem() + { + // Arrange + var route = $"/api/v1/todo-items/1337"; + var httpMethod = new HttpMethod("GET"); + var request = new HttpRequestMessage(httpMethod, route); + + // Act + var response = await _fixture.Client.GetAsync(route); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + } + + [Fact] + public async Task Unauthorized_Passport() + { + // Arrange + var route = $"/api/v1/people/1?include=passport"; + var httpMethod = new HttpMethod("GET"); + var request = new HttpRequestMessage(httpMethod, route); + + // Act + var response = await _fixture.Client.GetAsync(route); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + } + + [Fact] + public async Task Unauthorized_Article() + { + // Arrange + var context = _fixture.GetService(); + await context.SaveChangesAsync(); + + var article = _articleFaker.Generate(); + article.Name = "Classified"; + context.Articles.Add(article); + await context.SaveChangesAsync(); + + var route = $"/api/v1/articles/{article.Id}"; + + var httpMethod = new HttpMethod("GET"); + var request = new HttpRequestMessage(httpMethod, route); + + + // Act + var response = await _fixture.Client.GetAsync(route); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + + } + + [Fact] + public async Task Article_Is_Hidden() + { + // Arrange + var context = _fixture.GetService(); + + var articles = _articleFaker.Generate(3).ToList(); + string toBeExcluded = "This should be not be included"; + articles[0].Name = toBeExcluded; + + + context.Articles.AddRange(articles); + await context.SaveChangesAsync(); + + var route = $"/api/v1/articles"; + + var httpMethod = new HttpMethod("GET"); + var request = new HttpRequestMessage(httpMethod, route); + + + // Act + var response = await _fixture.Client.GetAsync(route); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.OK == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + Assert.DoesNotContain(toBeExcluded, body); + } + + [Fact] + public async Task Tag_Is_Hidden() + { + // Arrange + var context = _fixture.GetService(); + await context.SaveChangesAsync(); + + var article = _articleFaker.Generate(); + var tags = _tagFaker.Generate(2); + string toBeExcluded = "This should be not be included"; + tags[0].Name = toBeExcluded; + + var articleTags = new ArticleTag[] + { + new ArticleTag + { + Article = article, + Tag = tags[0] + }, + new ArticleTag + { + Article = article, + Tag = tags[1] + } + }; + context.ArticleTags.AddRange(articleTags); + await context.SaveChangesAsync(); + + var route = $"/api/v1/articles?include=tags"; + + var httpMethod = new HttpMethod("GET"); + var request = new HttpRequestMessage(httpMethod, route); + + + // Act + var response = await _fixture.Client.GetAsync(route); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.OK == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + Assert.DoesNotContain(toBeExcluded, body); + } + ///// + ///// In the Cascade Permission Error tests, we ensure that all the relevant + ///// entities are provided in the hook definitions. In this case, + ///// re-relating the meta object to a different article would require + ///// also a check for the lockedTodo, because we're implicitly updating + ///// its foreign key. + ///// + [Fact] + public async Task Cascade_Permission_Error__Create_ToOne_Relationship() + { + // Arrange + var context = _fixture.GetService(); + var lockedPerson = _personFaker.Generate(); + lockedPerson.IsLocked = true; + var passport = new Passport(); + lockedPerson.Passport = passport; + context.People.AddRange(lockedPerson); + await context.SaveChangesAsync(); + + var content = new + { + data = new + { + type = "people", + relationships = new Dictionary + { + { "passport", new + { + data = new { type = "passports", id = $"{lockedPerson.Passport.Id}" } + } + } + } + } + }; + + var httpMethod = new HttpMethod("POST"); + var route = $"/api/v1/people"; + var request = new HttpRequestMessage(httpMethod, route); + + string serializedContent = JsonConvert.SerializeObject(content); + request.Content = new StringContent(serializedContent); + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + // should throw 403 in PersonResource implicit hook + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + } + + + [Fact] + public async Task Cascade_Permission_Error__Updating_ToOne_Relationship() + { + // Arrange + var context = _fixture.GetService(); + var person = _personFaker.Generate(); + var passport = new Passport() { IsLocked = true }; + person.Passport = passport; + context.People.AddRange(person); + var newPassport = new Passport() { }; + context.Passports.Add(newPassport); + await context.SaveChangesAsync(); + + var content = new + { + data = new + { + type = "people", + id = person.Id, + relationships = new Dictionary + { + { "passport", new + { + data = new { type = "passports", id = $"{newPassport.Id}" } + } + } + } + } + }; + + var httpMethod = new HttpMethod("PATCH"); + var route = $"/api/v1/people/{person.Id}"; + var request = new HttpRequestMessage(httpMethod, route); + + string serializedContent = JsonConvert.SerializeObject(content); + request.Content = new StringContent(serializedContent); + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + + } + + [Fact] + public async Task Cascade_Permission_Error__Updating_ToOne_Relationship_Deletion() + { + // Arrange + var context = _fixture.GetService(); + var person = _personFaker.Generate(); + var passport = new Passport() { IsLocked = true }; + person.Passport = passport; + context.People.AddRange(person); + var newPassport = new Passport() { }; + context.Passports.Add(newPassport); + await context.SaveChangesAsync(); + + var content = new + { + data = new + { + type = "people", + id = person.Id, + relationships = new Dictionary + { + { "passport", new + { + data = (object)null + } + } + } + } + }; + + var httpMethod = new HttpMethod("PATCH"); + var route = $"/api/v1/people/{person.Id}"; + var request = new HttpRequestMessage(httpMethod, route); + + string serializedContent = JsonConvert.SerializeObject(content); + request.Content = new StringContent(serializedContent); + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + + } + + + + [Fact] + public async Task Cascade_Permission_Error__Delete_ToOne_Relationship() + { + // Arrange + var context = _fixture.GetService(); + var lockedPerson = _personFaker.Generate(); + lockedPerson.IsLocked = true; + var passport = new Passport(); + lockedPerson.Passport = passport; + context.People.AddRange(lockedPerson); + await context.SaveChangesAsync(); + + var httpMethod = new HttpMethod("DELETE"); + var route = $"/api/v1/passports/{lockedPerson.PassportId}"; + var request = new HttpRequestMessage(httpMethod, route); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + } + + + + [Fact] + public async Task Cascade_Permission_Error__Create_ToMany_Relationship() + { + // Arrange + var context = _fixture.GetService(); + var persons = _personFaker.Generate(2).ToList(); + var lockedTodo = _todoItemFaker.Generate(); + lockedTodo.IsLocked = true; + lockedTodo.StakeHolders = persons; + context.TodoItems.Add(lockedTodo); + await context.SaveChangesAsync(); + + var content = new + { + data = new + { + type = "todo-items", + relationships = new Dictionary + { + { "stake-holders", new + { + data = new object[] + { + new { type = "people", id = $"{lockedTodo.StakeHolders[0].Id}" }, + new { type = "people", id = $"{lockedTodo.StakeHolders[1].Id}" } + } + + } + } + } + } + }; + + var httpMethod = new HttpMethod("POST"); + var route = $"/api/v1/todo-items"; + var request = new HttpRequestMessage(httpMethod, route); + + string serializedContent = JsonConvert.SerializeObject(content); + request.Content = new StringContent(serializedContent); + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + } + + [Fact] + public async Task Cascade_Permission_Error__Updating_ToMany_Relationship() + { + // Arrange + var context = _fixture.GetService(); + var persons = _personFaker.Generate(2).ToList(); + var lockedTodo = _todoItemFaker.Generate(); + lockedTodo.IsLocked = true; + lockedTodo.StakeHolders = persons; + context.TodoItems.Add(lockedTodo); + var unlockedTodo = _todoItemFaker.Generate(); + context.TodoItems.Add(unlockedTodo); + await context.SaveChangesAsync(); + + var content = new + { + data = new + { + type = "todo-items", + id = unlockedTodo.Id, + relationships = new Dictionary + { + { "stake-holders", new + { + data = new object[] + { + new { type = "people", id = $"{lockedTodo.StakeHolders[0].Id}" }, + new { type = "people", id = $"{lockedTodo.StakeHolders[1].Id}" } + } + + } + } + } + } + }; + + var httpMethod = new HttpMethod("PATCH"); + var route = $"/api/v1/todo-items/{unlockedTodo.Id}"; + var request = new HttpRequestMessage(httpMethod, route); + + string serializedContent = JsonConvert.SerializeObject(content); + request.Content = new StringContent(serializedContent); + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + + // were unrelating a persons from a locked todo, so this should be unauthorized + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + + } + + [Fact] + public async Task Cascade_Permission_Error__Delete_ToMany_Relationship() + { + // Arrange + var context = _fixture.GetService(); + var persons = _personFaker.Generate(2).ToList(); + var lockedTodo = _todoItemFaker.Generate(); + lockedTodo.IsLocked = true; + lockedTodo.StakeHolders = persons; + context.TodoItems.Add(lockedTodo); + await context.SaveChangesAsync(); + + var httpMethod = new HttpMethod("DELETE"); + var route = $"/api/v1/people/{lockedTodo.StakeHolders[0].Id}"; + var request = new HttpRequestMessage(httpMethod, route); + + // Act + var response = await _fixture.Client.SendAsync(request); + + // Assert + var body = await response.Content.ReadAsStringAsync(); + Assert.True(HttpStatusCode.Forbidden == response.StatusCode, $"{route} returned {response.StatusCode} status code with payload: {body}"); + } + } +} diff --git a/test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/UpdatingDataTests.cs b/test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/UpdatingDataTests.cs index b1145f3654..b565e48c56 100644 --- a/test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/UpdatingDataTests.cs +++ b/test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/UpdatingDataTests.cs @@ -207,6 +207,13 @@ public async Task Can_Patch_Entity() [Fact] public async Task Patch_Entity_With_HasMany_Does_Not_Included_Relationships() { + /// @TODO: if we add a BeforeUpate resource hook to PersonDefinition + /// with database values enabled, this test will fail because todo-items + /// will be included in the person instance in the database-value loading. + /// This is then attached in the EF dbcontext, so when the query is executed and returned, + /// that entity will still have the relationship included even though the repo didn't include it. + + // arrange var todoItem = _todoItemFaker.Generate(); var person = _personFaker.Generate(); diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj index c0c410f7c7..bf27086a63 100755 --- a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -17,7 +17,7 @@ - + diff --git a/test/JsonApiDotNetCoreExampleTests/results b/test/JsonApiDotNetCoreExampleTests/results deleted file mode 100644 index 09e896913c..0000000000 --- a/test/JsonApiDotNetCoreExampleTests/results +++ /dev/null @@ -1,19364 +0,0 @@ -Build started, please wait... -Build completed. - -Test run for /Users/jarednance/dev/json-api-dotnet-core/test/JsonApiDotNetCoreExampleTests/bin/Debug/netcoreapp2.0/JsonApiDotNetCoreExampleTests.dll(.NETCoreApp,Version=v2.0) -Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02 -Copyright (c) Microsoft Corporation. All rights reserved. - -Starting test execution, please wait... -[xUnit.net 00:00:01.5429620] Discovering: JsonApiDotNetCoreExampleTests -[xUnit.net 00:00:01.7795750] Discovered: JsonApiDotNetCoreExampleTests -[xUnit.net 00:00:01.9136060] Starting: JsonApiDotNetCoreExampleTests -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (46ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (21ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (21ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/camelCasedModels -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/camelCasedModels -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'CamelCasedModels'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PostAsync (JsonApiDotNetCoreExample)' with id 'c71c760f-c1d1-4899-8d4b-62a4348b63f7' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from CamelCasedModel _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from CamelCasedModel _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "CamelCasedModels" AS "c"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "CamelCasedModels" AS "c" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "CamelCasedModels" AS "c" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "CamelCasedModels" AS "c" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from CamelCasedModel _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from CamelCasedModel _2 in DbSet select [_2]).Skip(__p_0).Ta...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from CamelCasedModel _2 in DbSet select [_2]).Skip(__p_0).Ta...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from CamelCasedModel _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "c"."Id", "c"."CompoundAttr" - FROM "CamelCasedModels" AS "c" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: CamelCasedModel }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "c"."Id", "c"."CompoundAttr" - FROM "CamelCasedModels" AS "c" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (17ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "c"."Id", "c"."CompoundAttr" - FROM "CamelCasedModels" AS "c" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (17ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "c"."Id", "c"."CompoundAttr" - FROM "CamelCasedModels" AS "c" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) in 797.042ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) in 797.042ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 1177.077ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 1177.077ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/camelCasedModels/118 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/camelCasedModels/118 application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'CamelCasedModels/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample)' with id '56304397-4d3c-4262-91df-9d2020a11d38' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.DeleteAsync (JsonApiDotNetCoreExample)' with id 'b4ae66ce-aa8f-4c8e-869c-4b784d8bff92' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PatchAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (118, JsonApiDotNetCoreExample.Models.CamelCasedModel) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (118, JsonApiDotNetCoreExample.Models.CamelCasedModel) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from CamelCasedModel e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from CamelCasedModel e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: CamelCasedModel }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "CamelCasedModels" SET "CompoundAttr" = @p0 - WHERE "Id" = @p1; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "CamelCasedModels" SET "CompoundAttr" = @p0 - WHERE "Id" = @p1; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "CamelCasedModels" SET "CompoundAttr" = @p0 - WHERE "Id" = @p1; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PatchAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PatchAsync (JsonApiDotNetCoreExample) in 354.058ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PatchAsync (JsonApiDotNetCoreExample) in 354.058ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 419.972ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 419.972ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/camelCasedModels application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/camelCasedModels application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'CamelCasedModels'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample)' with id '666fde0d-b734-495f-ad63-c5150103bbae' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PostAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.CamelCasedModel) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.CamelCasedModel) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PostAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.CreatedResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PostAsync (JsonApiDotNetCoreExample) in 53.052ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 68.79ms 201 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PostAsync (JsonApiDotNetCoreExample) in 53.052ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 68.79ms 201 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "CamelCasedModels" ("CompoundAttr") - VALUES (@p0) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/camelCasedModels/120 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/camelCasedModels/120 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'CamelCasedModels/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.PatchAsync (JsonApiDotNetCoreExample)' with id 'e8c838e7-928c-4438-9423-73d694f2a735' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.DeleteAsync (JsonApiDotNetCoreExample)' with id 'd3dc7c59-c458-484c-864d-c679f2275710' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) with arguments (120) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) with arguments (120) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from CamelCasedModel e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from CamelCasedModel e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: CamelCasedModel }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (13ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (13ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."CompoundAttr" - FROM "CamelCasedModels" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) in 54.591ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 73.364ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.CamelCasedModelsController.GetAsync (JsonApiDotNetCoreExample) in 54.591ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 73.364ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/readonly -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/readonly -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'ReadOnly'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample)' with id '9ceae986-2052-4187-bc60-6db234b1ede5' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Post (JsonApiDotNetCoreExample)' with id '4de72652-5656-423c-b4be-3cd9c940d171' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Delete (JsonApiDotNetCoreExample)' with id '521d748c-b696-4748-b738-371680d2c9e3' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Patch (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support PATCH requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support PATCH requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Patch (JsonApiDotNetCoreExample) in 25.699ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Patch (JsonApiDotNetCoreExample) in 25.699ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 41.952ms 405 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 41.952ms 405 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/readonly -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/readonly -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'ReadOnly'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample)' with id '18714b6d-0833-4259-935e-8efa022d086d' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Post (JsonApiDotNetCoreExample)' with id '0fef2165-3efb-4658-933a-7ae6ef0c7232' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Patch (JsonApiDotNetCoreExample)' with id '1d6daeba-8dfb-4b24-b56b-7a5283a29bc4' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Delete (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support DELETE requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support DELETE requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Delete (JsonApiDotNetCoreExample) in 6.393ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Delete (JsonApiDotNetCoreExample) in 6.393ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.237ms 405 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.237ms 405 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/readonly -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/readonly -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'ReadOnly'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample)' with id '6a344e07-367a-4086-a290-a9ac9ff653b2' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Patch (JsonApiDotNetCoreExample)' with id '65f4bfd4-7222-41ed-8406-d267a25771cc' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Delete (JsonApiDotNetCoreExample)' with id '7151bfbd-129b-4a37-a514-c5cb1561f85c' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Post (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support POST requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support POST requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Post (JsonApiDotNetCoreExample) in 3.628ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Post (JsonApiDotNetCoreExample) in 3.628ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.455ms 405 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.455ms 405 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/readonly -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/readonly -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'ReadOnly'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Post (JsonApiDotNetCoreExample)' with id 'd692e0ba-f723-4660-aeb5-bb2fab767d08' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Patch (JsonApiDotNetCoreExample)' with id 'bb9f84b7-1768-4c5c-a5d4-8142f3aa7da2' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Delete (JsonApiDotNetCoreExample)' with id 'cadd349f-7374-4fc1-97df-b7df9a994684' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample) in 3.6ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.ReadOnlyController.Get (JsonApiDotNetCoreExample) in 3.6ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.744ms 200 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.744ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/nohttpdelete -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/nohttpdelete -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpDelete'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample)' with id 'e8ba1352-03b1-4166-9e79-1ce0c48f95f7' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample)' with id 'ebe48f67-b775-4198-b4d8-dae0bbabc2e6' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Delete (JsonApiDotNetCoreExample)' with id '01ed4864-4f42-4865-af7f-c39b40fea67b' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample) in 0.719ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 14.875ms 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample) in 0.719ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 14.875ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/nohttpdelete -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/nohttpdelete -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpDelete'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample)' with id '72b19a09-1b1f-4691-a363-cb0f10df7f44' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample)' with id '37d45424-cba6-4b3a-b19c-66490c70208f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample)' with id '6dd43591-857d-4625-8fa4-a261d04da16b' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Delete (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support DELETE requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support DELETE requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Delete (JsonApiDotNetCoreExample) in 3.513ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Delete (JsonApiDotNetCoreExample) in 3.513ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.684ms 405 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.684ms 405 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/nohttpdelete -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/nohttpdelete -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpDelete'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample)' with id 'c95f1a88-8eff-4b37-8f6a-7d8b7398b131' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample)' with id '9ea775d5-e54f-4b2c-b274-e2d8010d4134' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Delete (JsonApiDotNetCoreExample)' with id 'f9ede477-a111-42f0-a8bf-5b81166908ee' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample) in 0.329ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 15.698ms 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample) in 0.329ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 15.698ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/nohttpdelete -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/nohttpdelete -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpDelete'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Get (JsonApiDotNetCoreExample)' with id 'c702b174-b075-49f0-a851-626c2f1dceac' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Post (JsonApiDotNetCoreExample)' with id 'a34519c4-5ff5-47fa-a55e-fdcddd23ac7d' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Delete (JsonApiDotNetCoreExample)' with id '1cdfd359-36bc-421e-a025-7af36c463692' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample) in 0.378ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.973ms 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpDeleteController.Patch (JsonApiDotNetCoreExample) in 0.378ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.973ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/nohttppatch -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/nohttppatch -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPatch'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample)' with id '0a47ec59-9bd6-4f86-8ae7-784146f24d25' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample)' with id 'c40826a8-bb78-495b-a580-8a34f21f90e1' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Patch (JsonApiDotNetCoreExample)' with id '65968202-d190-4c70-9ac5-855e064ec85c' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample) in 0.544ms -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.402ms 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample) in 0.544ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.402ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/nohttppatch -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/nohttppatch -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPatch'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample)' with id '9b16d4b3-796c-4630-b944-4a0c28230844' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample)' with id '867fa153-19b0-422e-aa0a-30a3f58f84e0' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample)' with id '82d36401-dc08-4ff0-b285-dd2f8d333f59' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Patch (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support PATCH requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support PATCH requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Patch (JsonApiDotNetCoreExample) in 7.468ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Patch (JsonApiDotNetCoreExample) in 7.468ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 19.429ms 405 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 19.429ms 405 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/nohttppatch -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/nohttppatch -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPatch'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample)' with id '957f4e51-8d40-4405-a523-0f3096cf96c1' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Patch (JsonApiDotNetCoreExample)' with id 'a69c8f75-6924-4fcf-b2b3-c5d0277d4340' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample)' with id '74dbbd63-6ca3-4fbd-8077-3b4f30a6f6e0' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample) in 0.608ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample) in 0.608ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 20.436ms 200 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 20.436ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/nohttppatch -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/nohttppatch -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPatch'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Get (JsonApiDotNetCoreExample)' with id 'e9ebb853-6169-4cc6-ba17-54a9ed00e805' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Patch (JsonApiDotNetCoreExample)' with id 'dab9b84a-0944-4807-bcbc-6dc1e7964c47' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Delete (JsonApiDotNetCoreExample)' with id '7e09310e-ec5e-4829-be57-632f6f7d1c89' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample) in 0.452ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 14.392ms 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPatchController.Post (JsonApiDotNetCoreExample) in 0.452ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 14.392ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/nohttppost -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/nohttppost -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPost'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample)' with id '2c61d7ce-c38b-43b3-b51b-702e595f6b37' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Post (JsonApiDotNetCoreExample)' with id 'fded13c7-20e9-402b-9cd0-66aee2c5fee4' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample)' with id '28252322-bbf4-46b2-8941-284cc1b1df1a' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample) in 0.934ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample) in 0.934ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.025ms 200 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.025ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/nohttppost -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/nohttppost -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPost'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Post (JsonApiDotNetCoreExample)' with id 'eab96b94-f493-457f-97de-9b2995d5557a' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample)' with id '38baef8d-7d72-46dd-9f2a-bd1de31f9e15' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample)' with id '5e424bdc-48fd-4059-b3df-2f40347c6fac' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample) in 0.346ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.34ms 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample) in 0.346ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.34ms 200 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/nohttppost -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/nohttppost -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPost'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample)' with id 'aa8ab36f-b617-4d80-8754-7342c289a15b' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample)' with id '71ab4fa0-892e-4cfa-bec8-6d1fa27fdc09' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample)' with id '2a0fc13f-0311-4ed2-a6fe-33f0355d1962' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Post (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support POST requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: This resource does not support POST requests. - at JsonApiDotNetCore.Controllers.HttpRestrictAttribute.d__2.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/HttpMethodRestrictionFilter.cs:line 21 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Post (JsonApiDotNetCoreExample) in 3.885ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Post (JsonApiDotNetCoreExample) in 3.885ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 19.512ms 405 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 19.512ms 405 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/nohttppost -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/nohttppost -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'NoHttpPost'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Get (JsonApiDotNetCoreExample)' with id 'e8d78aa6-b1bc-490e-b743-11e7d5769b09' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Post (JsonApiDotNetCoreExample)' with id '2d2b399d-9677-4946-bf9a-f0c8c4e644c3' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Patch (JsonApiDotNetCoreExample)' with id '9d2d6081-3838-4c95-9310-84cfce59572d' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample) in 0.446ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.61ms 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.Restricted.NoHttpPostController.Delete (JsonApiDotNetCoreExample) in 0.446ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 18.61ms 200 -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - 'from TodoItem _0 in DbSet - select [_0]' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - 'from TodoItem _0 in DbSet - select [_0]' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t", - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; - DELETE FROM "TodoItems" - WHERE "Id" = @p15; - DELETE FROM "TodoItems" - WHERE "Id" = @p16; - DELETE FROM "TodoItems" - WHERE "Id" = @p17; - DELETE FROM "TodoItems" - WHERE "Id" = @p18; - DELETE FROM "TodoItems" - WHERE "Id" = @p19; - DELETE FROM "TodoItems" - WHERE "Id" = @p20; - DELETE FROM "TodoItems" - WHERE "Id" = @p21; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; - DELETE FROM "TodoItems" - WHERE "Id" = @p28; - DELETE FROM "TodoItems" - WHERE "Id" = @p29; - DELETE FROM "TodoItems" - WHERE "Id" = @p30; - DELETE FROM "TodoItems" - WHERE "Id" = @p31; - DELETE FROM "TodoItems" - WHERE "Id" = @p32; - DELETE FROM "TodoItems" - WHERE "Id" = @p33; - DELETE FROM "TodoItems" - WHERE "Id" = @p34; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; - DELETE FROM "TodoItems" - WHERE "Id" = @p15; - DELETE FROM "TodoItems" - WHERE "Id" = @p16; - DELETE FROM "TodoItems" - WHERE "Id" = @p17; - DELETE FROM "TodoItems" - WHERE "Id" = @p18; - DELETE FROM "TodoItems" - WHERE "Id" = @p19; - DELETE FROM "TodoItems" - WHERE "Id" = @p20; - DELETE FROM "TodoItems" - WHERE "Id" = @p21; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; - DELETE FROM "TodoItems" - WHERE "Id" = @p28; - DELETE FROM "TodoItems" - WHERE "Id" = @p29; - DELETE FROM "TodoItems" - WHERE "Id" = @p30; - DELETE FROM "TodoItems" - WHERE "Id" = @p31; - DELETE FROM "TodoItems" - WHERE "Id" = @p32; - DELETE FROM "TodoItems" - WHERE "Id" = @p33; - DELETE FROM "TodoItems" - WHERE "Id" = @p34; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; - DELETE FROM "TodoItems" - WHERE "Id" = @p15; - DELETE FROM "TodoItems" - WHERE "Id" = @p16; - DELETE FROM "TodoItems" - WHERE "Id" = @p17; - DELETE FROM "TodoItems" - WHERE "Id" = @p18; - DELETE FROM "TodoItems" - WHERE "Id" = @p19; - DELETE FROM "TodoItems" - WHERE "Id" = @p20; - DELETE FROM "TodoItems" - WHERE "Id" = @p21; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; - DELETE FROM "TodoItems" - WHERE "Id" = @p28; - DELETE FROM "TodoItems" - WHERE "Id" = @p29; - DELETE FROM "TodoItems" - WHERE "Id" = @p30; - DELETE FROM "TodoItems" - WHERE "Id" = @p31; - DELETE FROM "TodoItems" - WHERE "Id" = @p32; - DELETE FROM "TodoItems" - WHERE "Id" = @p33; - DELETE FROM "TodoItems" - WHERE "Id" = @p34; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p35, @p36, @p37, @p38, @p39, @p40, @p41, @p42) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p43, @p44, @p45, @p46, @p47, @p48, @p49, @p50) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p51, @p52, @p53, @p54, @p55, @p56, @p57, @p58) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p59, @p60, @p61, @p62, @p63, @p64, @p65, @p66) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (18ms) [Parameters=[@p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p35, @p36, @p37, @p38, @p39, @p40, @p41, @p42) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p43, @p44, @p45, @p46, @p47, @p48, @p49, @p50) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p51, @p52, @p53, @p54, @p55, @p56, @p57, @p58) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p59, @p60, @p61, @p62, @p63, @p64, @p65, @p66) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (18ms) [Parameters=[@p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p35, @p36, @p37, @p38, @p39, @p40, @p41, @p42) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p43, @p44, @p45, @p46, @p47, @p48, @p49, @p50) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p51, @p52, @p53, @p54, @p55, @p56, @p57, @p58) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p59, @p60, @p61, @p62, @p63, @p64, @p65, @p66) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?sort=-ordinal -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?sort=-ordinal -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem x in DbSet - order by [x].Ordinal desc - select [x]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem x in DbSet - select [x]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem x in DbSet - order by [x].Ordinal desc - select [x]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem x in DbSet - order by [x].Ordinal desc - select [x]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" DESC - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" DESC - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" DESC - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" DESC - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 73.508ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 73.508ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 90.09ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 90.09ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?filter[ordinal]=999999 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?filter[ordinal]=999999 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where [model].Ordinal == 999999 - select [model]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - where [model].Ordinal == 999999 - select [model]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where [model].Ordinal == 999999 - select [model]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where [model].Ordinal == 999999 select [model]).Skip(__p_0)....' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where [model].Ordinal == 999999 select [model]).Skip(__p_0)....' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - where [model].Ordinal == 999999 - select [model]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999 - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999 - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999 - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."Ordinal" = 999999 - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 48.005ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 50.255ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 48.005ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 50.255ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2594 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2594 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2594) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2594) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 17.158ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 17.158ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 21.735ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 21.735ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2595 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2595 application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id '432a039f-d92f-4b06-93f6-76d9e6be26be' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2595, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2595, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "AchievedDate" = @p0, "CreatedDate" = @p1, "Description" = @p2 - WHERE "Id" = @p3; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "AchievedDate" = @p0, "CreatedDate" = @p1, "Description" = @p2 - WHERE "Id" = @p3; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "AchievedDate" = @p0, "CreatedDate" = @p1, "Description" = @p2 - WHERE "Id" = @p3; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 22.314ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 27.243ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 22.314ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 27.243ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 9.452ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 9.452ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 9.891ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 9.891ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id 'f11b0d8e-7eb6-44c7-b10f-29a156acd6ba' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.CreatedResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 11.535ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 11.535ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.578ms 201 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 16.578ms 201 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2598 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2598 application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id '432a039f-d92f-4b06-93f6-76d9e6be26be' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2598, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2598, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "AchievedDate" = @p0, "CreatedDate" = @p1, "Description" = @p2 - WHERE "Id" = @p3; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "AchievedDate" = @p0, "CreatedDate" = @p1, "Description" = @p2 - WHERE "Id" = @p3; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "AchievedDate" = @p0, "CreatedDate" = @p1, "Description" = @p2 - WHERE "Id" = @p3; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 8.845ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 8.845ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 9.112ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 9.112ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p28, @p29, @p30, @p31, @p32, @p33, @p34, @p35) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p36, @p37, @p38, @p39, @p40, @p41, @p42, @p43) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p28, @p29, @p30, @p31, @p32, @p33, @p34, @p35) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p36, @p37, @p38, @p39, @p40, @p41, @p42, @p43) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p28, @p29, @p30, @p31, @p32, @p33, @p34, @p35) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p36, @p37, @p38, @p39, @p40, @p41, @p42, @p43) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?sort=ordinal -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?sort=ordinal -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem x in DbSet - order by [x].Ordinal asc - select [x]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem x in DbSet - select [x]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "x" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem x in DbSet - order by [x].Ordinal asc - select [x]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem x in DbSet - order by [x].Ordinal asc - select [x]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" - ORDER BY "x"."Ordinal" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 14.927ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 14.927ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 15.301ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 15.301ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2603 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2603 application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id '432a039f-d92f-4b06-93f6-76d9e6be26be' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2603, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2603, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "CreatedDate" = @p0, "Description" = @p1, "Ordinal" = @p2 - WHERE "Id" = @p3; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "CreatedDate" = @p0, "Description" = @p1, "Ordinal" = @p2 - WHERE "Id" = @p3; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p3='?', @p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "CreatedDate" = @p0, "Description" = @p1, "Ordinal" = @p2 - WHERE "Id" = @p3; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 5.286ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 5.286ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 5.705ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 5.705ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/api/v1/todo-items/2604 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/api/v1/todo-items/2604 application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id '432a039f-d92f-4b06-93f6-76d9e6be26be' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) with arguments (2604) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) with arguments (2604) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.NoContentResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 204 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 204 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) in 20.385ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) in 20.385ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 24.713ms 204 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 24.713ms 204 -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem t in DbSet - where [t].Id == __todoItem_Id_0 - select [t]).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem t in DbSet - where [t].Id == __todoItem_Id_0 - select [t]).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ToSequence(TodoItem FirstOrDefault(IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1, - shaper: UnbufferedEntityShaper))), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2605?include=owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2605?include=owner -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2605) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2605) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]) - .Include("Owner") - .FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - join Person e.Owner in DbSet - on Property([e], "OwnerId") equals (Nullable)Property([e.Owner], "Id") into e.Owner_group - from Person e.Owner in - (from Person e.Owner_groupItem in [e.Owner_group] - select [e.Owner_groupItem]).DefaultIfEmpty() - where bool [e].Id.Equals((object)__id_0) - select TodoItem _Include( - queryContext: queryContext, - entity: [e], - included: new object[]{ [e.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task FirstOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 225.239ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 225.49ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 225.239ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 225.49ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?filter[description]=like:ui%20eum%20quo%20sit%20fugiat -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?filter[description]=like:ui%20eum%20quo%20sit%20fugiat -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where bool [model].Description.Contains("ui eum quo sit fugiat") - select [model]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - where bool [model].Description.Contains("ui eum quo sit fugiat") - select [model]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where bool [model].Description.Contains("ui eum quo sit fugiat") - select [model]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where bool [model].Description.Contains("ui eum quo sit fugi...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where bool [model].Description.Contains("ui eum quo sit fugi...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - where bool [model].Description.Contains("ui eum quo sit fugiat") - select [model]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0 - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0 - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0 - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE STRPOS("model"."Description", 'ui eum quo sit fugiat') > 0 - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 21.347ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 21.347ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 22.376ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 22.376ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner&filter[owner.first-name]=Crawford -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner&filter[owner.first-name]=Crawford -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where [model].Owner.FirstName == "Crawford" - select [model]) - .Include("Owner") - .Count()' -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[model].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[model].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - join Person model.Owner in DbSet - on Property([model], "OwnerId") equals (Nullable)Property([model.Owner], "Id") into model.Owner_group - from Person model.Owner in - (from Person model.Owner_groupItem in [model.Owner_group] - select [model.Owner_groupItem]).DefaultIfEmpty() - where [model.Owner]?.FirstName == "Crawford" - select [model]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford'), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford' -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford' -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford' -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where [model].Owner.FirstName == "Crawford" - select [model]) - .Include("Owner") - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where [model].Owner.FirstName == "Crawford" select [model])....' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where [model].Owner.FirstName == "Crawford" select [model])....' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[model].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - join Person model.Owner in DbSet - on Property([model], "OwnerId") equals (Nullable)Property([model.Owner], "Id") into model.Owner_group - from Person model.Owner in - (from Person model.Owner_groupItem in [model.Owner_group] - select [model.Owner_groupItem]).DefaultIfEmpty() - where [model.Owner]?.FirstName == "Crawford" - select TodoItem _Include( - queryContext: queryContext, - entity: [model], - included: new object[]{ [model.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId", "model.Owner"."Id", "model.Owner"."FirstName", "model.Owner"."LastName" - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford' - LIMIT @__p_1 OFFSET @__p_0, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId", "model.Owner"."Id", "model.Owner"."FirstName", "model.Owner"."LastName" - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford' - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId", "model.Owner"."Id", "model.Owner"."FirstName", "model.Owner"."LastName" - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford' - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId", "model.Owner"."Id", "model.Owner"."FirstName", "model.Owner"."LastName" - FROM "TodoItems" AS "model" - LEFT JOIN "People" AS "model.Owner" ON "model"."OwnerId" = "model.Owner"."Id" - WHERE "model.Owner"."FirstName" = 'Crawford' - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 48.283ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 48.283ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 53.232ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 53.232ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner&filter[achieved-date]=2/18/18%2012:00:00%20AM -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner&filter[achieved-date]=2/18/18%2012:00:00%20AM -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Filter is not allowed for attribute 'achieved-date'. - at JsonApiDotNetCore.Internal.Query.AttrFilterQuery..ctor(IJsonApiContext jsonApiContext, FilterQuery filterQuery) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Internal/Query/AttrFilterQuery.cs:line 26 - at JsonApiDotNetCore.Extensions.IQueryableExtensions.Filter[TSource](IQueryable`1 source, IJsonApiContext jsonApiContext, FilterQuery filterQuery) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs:line 88 - at JsonApiDotNetCore.Data.DefaultEntityRepository`2.Filter(IQueryable`1 entities, FilterQuery filterQuery) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs:line 61 - at JsonApiDotNetCore.Services.EntityResourceService`2.ApplySortAndFilterQuery(IQueryable`1 entities) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 156 - at JsonApiDotNetCore.Services.EntityResourceService`2.d__4.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 46 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2.d__12.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 109 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.JsonApiController`2.d__3.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 62 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Filter is not allowed for attribute 'achieved-date'. - at JsonApiDotNetCore.Internal.Query.AttrFilterQuery..ctor(IJsonApiContext jsonApiContext, FilterQuery filterQuery) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Internal/Query/AttrFilterQuery.cs:line 26 - at JsonApiDotNetCore.Extensions.IQueryableExtensions.Filter[TSource](IQueryable`1 source, IJsonApiContext jsonApiContext, FilterQuery filterQuery) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs:line 88 - at JsonApiDotNetCore.Data.DefaultEntityRepository`2.Filter(IQueryable`1 entities, FilterQuery filterQuery) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs:line 61 - at JsonApiDotNetCore.Services.EntityResourceService`2.ApplySortAndFilterQuery(IQueryable`1 entities) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 156 - at JsonApiDotNetCore.Services.EntityResourceService`2.d__4.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 46 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2.d__12.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 109 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.JsonApiController`2.d__3.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 62 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 7.111ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 7.111ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 7.516ms 400 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 7.516ms 400 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?filter[guid-property]=a23f1cb2-5445-4cad-bda5-629ecc2002e2 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?filter[guid-property]=a23f1cb2-5445-4cad-bda5-629ecc2002e2 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where [model].GuidProperty == a23f1cb2-5445-4cad-bda5-629ecc2002e2 - select [model]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - where [model].GuidProperty == a23f1cb2-5445-4cad-bda5-629ecc2002e2 - select [model]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2'), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2' -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2' -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2' -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where [model].GuidProperty == a23f1cb2-5445-4cad-bda5-629ecc2002e2 - select [model]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where [model].GuidProperty == a23f1cb2-5445-4cad-bda5-629ecc...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem model in DbSet where [model].GuidProperty == a23f1cb2-5445-4cad-bda5-629ecc...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - where [model].GuidProperty == a23f1cb2-5445-4cad-bda5-629ecc2002e2 - select [model]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2' - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2' - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2' - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."AchievedDate", "model"."AssigneeId", "model"."CollectionId", "model"."CreatedDate", "model"."Description", "model"."GuidProperty", "model"."Ordinal", "model"."OwnerId" - FROM "TodoItems" AS "model" - WHERE "model"."GuidProperty" = 'a23f1cb2-5445-4cad-bda5-629ecc2002e2' - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 11.26ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 11.26ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 17.365ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 17.365ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner&sort=achieved-date -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner&sort=achieved-date -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '2fce3eb8-46a5-44ed-9a98-55e95b5c8e2f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Sort is not allowed for attribute 'achieved-date'. - at JsonApiDotNetCore.Services.QueryParser.ParseSortParameters(String value) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 165 - at JsonApiDotNetCore.Services.QueryParser.Parse(IQueryCollection query) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 51 - at JsonApiDotNetCore.Services.JsonApiContext.ApplyContext[T](Object controller) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/JsonApiContext.cs:line 70 - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 56 - at JsonApiDotNetCore.Controllers.JsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 40 - at JsonApiDotNetCore.Controllers.JsonApiController`1..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 17 - at JsonApiDotNetCoreExample.Controllers.TodoItemsController..ctor(IJsonApiContext jsonApiContext, IResourceService`1 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs:line 14 - at lambda_method(Closure , IServiceProvider , Object[] ) - at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.g__CreateController|0(ControllerContext controllerContext) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Sort is not allowed for attribute 'achieved-date'. - at JsonApiDotNetCore.Services.QueryParser.ParseSortParameters(String value) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 165 - at JsonApiDotNetCore.Services.QueryParser.Parse(IQueryCollection query) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 51 - at JsonApiDotNetCore.Services.JsonApiContext.ApplyContext[T](Object controller) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/JsonApiContext.cs:line 70 - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 56 - at JsonApiDotNetCore.Controllers.JsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 40 - at JsonApiDotNetCore.Controllers.JsonApiController`1..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 17 - at JsonApiDotNetCoreExample.Controllers.TodoItemsController..ctor(IJsonApiContext jsonApiContext, IResourceService`1 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs:line 14 - at lambda_method(Closure , IServiceProvider , Object[] ) - at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.g__CreateController|0(ControllerContext controllerContext) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 6ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 6ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 6.407ms 400 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 6.407ms 400 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items application/vnd.api+json; charset=ISO-8859-4 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items application/vnd.api+json; charset=ISO-8859-4 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 0.891ms 415 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 0.891ms 415 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 0.468ms 406 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 0.468ms 406 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '05049b95-e09d-45ad-ad89-bee6f6e0f23b' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 58.963ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 58.963ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 78.167ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 78.167ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id 'd54e2950-a2b5-4f65-98a5-dd097888aa4b' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.Person) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.Person) - ModelState is Valid -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -System.InvalidCastException: Unable to cast object of type 'JsonApiDotNetCoreExample.Models.Person' to type 'JsonApiDotNetCoreExample.Models.TodoItem'. - at lambda_method(Closure , Object , Object[] ) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -System.InvalidCastException: Unable to cast object of type 'JsonApiDotNetCoreExample.Models.Person' to type 'JsonApiDotNetCoreExample.Models.TodoItem'. - at lambda_method(Closure , Object , Object[] ) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 11.067ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 11.067ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 26.767ms 409 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 26.767ms 409 application/vnd.api+json -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-collections application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-collections application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItemCollection) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItemCollection) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p0, @p1, @p2); -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p0, @p1, @p2); -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) in 93.607ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 119.596ms 201 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) in 93.607ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 119.596ms 201 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id 'e4bc225e-4ba0-4fca-a686-db10af6c6128' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.StatusCodeResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 403 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 403 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 5.173ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 5.173ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 20.262ms 403 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 20.262ms 403 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-collections application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-collections application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-collections'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.GetAsync (JsonApiDotNetCoreExample)' with id '21ae0180-661e-43c0-aaba-a63666b354fa' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItemCollection) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItemCollection) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p0, @p1, @p2); -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p0, @p1, @p2); -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p0, @p1, @p2); -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.CreatedResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) in 58.596ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) in 58.596ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 77.468ms 201 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 77.468ms 201 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-collections application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-collections application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-collections'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.GetAsync (JsonApiDotNetCoreExample)' with id '3a8d48b8-e58c-4ef6-b4b3-166fd71553bc' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -fail: JsonApiDotNetCore.Formatters.JsonApiReader[0] - An error occurred while de-serializing the payload -JsonApiDotNetCore.Internal.JsonApiException: Failed to deserialize request body ---> System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[JsonApiDotNetCore.Models.ResourceIdentifierObject]' to type 'System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Object]]'. - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.SetHasManyRelationship(Object entity, PropertyInfo[] entityProperties, RelationshipAttribute attr, ContextEntity contextEntity, Dictionary`2 relationships) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 216 - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.SetRelationships(Object entity, ContextEntity contextEntity, Dictionary`2 relationships) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 156 - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.DocumentToObject(DocumentData data) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 92 - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 33 - --- End of inner exception stack trace --- - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 38 - at JsonApiDotNetCore.Formatters.JsonApiReader.ReadAsync(InputFormatterContext context) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Formatters/JsonApiReader.cs:line 39 -fail: JsonApiDotNetCore.Formatters.JsonApiReader[0] - An error occurred while de-serializing the payload -JsonApiDotNetCore.Internal.JsonApiException: Failed to deserialize request body ---> System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[JsonApiDotNetCore.Models.ResourceIdentifierObject]' to type 'System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Object]]'. - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.SetHasManyRelationship(Object entity, PropertyInfo[] entityProperties, RelationshipAttribute attr, ContextEntity contextEntity, Dictionary`2 relationships) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 216 - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.SetRelationships(Object entity, ContextEntity contextEntity, Dictionary`2 relationships) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 156 - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.DocumentToObject(DocumentData data) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 92 - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 33 - --- End of inner exception stack trace --- - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 38 - at JsonApiDotNetCore.Formatters.JsonApiReader.ReadAsync(InputFormatterContext context) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Formatters/JsonApiReader.cs:line 39 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) with arguments () - ModelState is Invalid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) with arguments () - ModelState is Invalid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.StatusCodeResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 422 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 422 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) in 22.188ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoCollectionsController.PostAsync (JsonApiDotNetCoreExample) in 22.188ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 42.033ms 422 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 42.033ms 422 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -[xUnit.net 00:00:12.5112580] JsonApiDotNetCore.Internal.JsonApiException : Failed to deserialize request body -[xUnit.net 00:00:12.5115070] ---- System.NullReferenceException : Object reference not set to an instance of an object. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -[xUnit.net 00:00:12.5136610] Stack Trace: -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -[xUnit.net 00:00:12.5158820] /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs(38,0): at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) -[xUnit.net 00:00:12.5161330] /Users/jarednance/dev/json-api-dotnet-core/test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/CreatingDataTests.cs(273,0): at JsonApiDotNetCoreExampleTests.Acceptance.Spec.CreatingDataTests.d__8.MoveNext() -[xUnit.net 00:00:12.5165710] --- End of stack trace from previous location where exception was thrown --- -[xUnit.net 00:00:12.5167200] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() -[xUnit.net 00:00:12.5168760] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) -[xUnit.net 00:00:12.5170850] --- End of stack trace from previous location where exception was thrown --- -[xUnit.net 00:00:12.5171820] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() -[xUnit.net 00:00:12.5172640] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) -[xUnit.net 00:00:12.5174340] --- End of stack trace from previous location where exception was thrown --- -[xUnit.net 00:00:12.5175190] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() -[xUnit.net 00:00:12.5175960] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) -[xUnit.net 00:00:12.5180580] ----- Inner Stack Trace ----- -[xUnit.net 00:00:12.5182020] /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs(32,0): at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id '72eb1fba-bd67-40f7-841e-5d45f4d87655' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6) - RETURNING "Id", "CreatedDate"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.CreatedResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 78.019ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 102.786ms 201 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 78.019ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 102.786ms 201 application/vnd.api+json -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 POST http://localhost/api/v1/todo-items application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) with arguments (JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("Id", "AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("Id", "AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "CreatedDate"; -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 72.862ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 94.538ms 201 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample) in 72.862ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 94.538ms 201 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).LastOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).LastOrDefault()' -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'LastOrDefault()' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'LastOrDefault()' could not be translated and will be evaluated locally. -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ToSequence(TodoItem LastOrDefault(IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t", - shaper: UnbufferedEntityShaper))), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/api/v1/todo-items/10099 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 DELETE http://localhost/api/v1/todo-items/10099 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id 'fe31e5b4-7432-4ff5-978a-cd27e2b93135' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '3c77838f-36d1-41ad-b93d-e79ea0456a72' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) with arguments (10099) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) with arguments (10099) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (16ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (16ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.NotFoundResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 404 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 404 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) in 26.655ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample) in 26.655ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 58.036ms 404 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 58.036ms 404 -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2611?include=owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2611?include=owner -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id 'da4f66ae-3f53-4439-80dc-28886ee0c729' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id 'df4d22d4-25aa-4cc4-b517-33a346cabff2' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2611) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2611) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]) - .Include("Owner") - .FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - join Person e.Owner in DbSet - on Property([e], "OwnerId") equals (Nullable)Property([e.Owner], "Id") into e.Owner_group - from Person e.Owner in - (from Person e.Owner_groupItem in [e.Owner_group] - select [e.Owner_groupItem]).DefaultIfEmpty() - where bool [e].Id.Equals((object)__id_0) - select TodoItem _Include( - queryContext: queryContext, - entity: [e], - included: new object[]{ [e.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task FirstOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 81.295ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 101.754ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 81.295ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 101.754ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - DELETE FROM "TodoItems" - WHERE "Id" = @p1; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - DELETE FROM "TodoItems" - WHERE "Id" = @p1; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - DELETE FROM "TodoItems" - WHERE "Id" = @p1; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '45c59ea2-28ca-4bbb-b184-0cd79d273bed' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 41.443ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 41.443ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 57.056ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 57.056ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2612/owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2612/owner -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}/{relationshipName}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) with arguments (2612, owner) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) with arguments (2612, owner) - ModelState is Valid -trce: JsonApiDotNetCore.Services.EntityResourceService[0] - Looking up 'Owner'... -dbug: JsonApiDotNetCore.Data.DefaultEntityRepository[0] - [JADN] GetAndIncludeAsync(2612, Owner) -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in - (from TodoItem _1 in DbSet - select [_1]).Include("Owner") - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_1].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - join Person e.Owner in DbSet - on Property([e], "OwnerId") equals (Nullable)Property([e.Owner], "Id") into e.Owner_group - from Person e.Owner in - (from Person e.Owner_groupItem in [e.Owner_group] - select [e.Owner_groupItem]).DefaultIfEmpty() - where bool [e].Id.Equals((object)__id_0) - select TodoItem _Include( - queryContext: queryContext, - entity: [e], - included: new object[]{ [e.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Relationship Owner not found. - at JsonApiDotNetCore.Services.EntityResourceService`2.d__9.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 102 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2.d__15.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 141 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.JsonApiController`2.d__6.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 73 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Relationship Owner not found. - at JsonApiDotNetCore.Services.EntityResourceService`2.d__9.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 102 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2.d__15.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 141 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.JsonApiController`2.d__6.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 73 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) in 58.256ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) in 58.256ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 78.585ms 404 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 78.585ms 404 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -Failed JsonApiDotNetCoreExampleTests.Acceptance.Spec.CreatingDataTests.Can_Create_And_Set_HasMany_Relationships -Error Message: - JsonApiDotNetCore.Internal.JsonApiException : Failed to deserialize request body ----- System.NullReferenceException : Object reference not set to an instance of an object. -Stack Trace: - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 38 - at JsonApiDotNetCoreExampleTests.Acceptance.Spec.CreatingDataTests.d__8.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/CreatingDataTests.cs:line 273 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ------ Inner Stack Trace ----- - at JsonApiDotNetCore.Serialization.JsonApiDeSerializer.Deserialize(String requestBody) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs:line 32 -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2613/owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2613/owner -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}/{relationshipName}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) with arguments (2613, owner) - ModelState is Valid -trce: JsonApiDotNetCore.Services.EntityResourceService[0] - Looking up 'Owner'... -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) with arguments (2613, owner) - ModelState is Valid -dbug: JsonApiDotNetCore.Data.DefaultEntityRepository[0] - [JADN] GetAndIncludeAsync(2613, Owner) -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in - (from TodoItem _1 in DbSet - select [_1]).Include("Owner") - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_1].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - join Person e.Owner in DbSet - on Property([e], "OwnerId") equals (Nullable)Property([e.Owner], "Id") into e.Owner_group - from Person e.Owner in - (from Person e.Owner_groupItem in [e.Owner_group] - select [e.Owner_groupItem]).DefaultIfEmpty() - where bool [e].Id.Equals((object)__id_0) - select TodoItem _Include( - queryContext: queryContext, - entity: [e], - included: new object[]{ [e.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) in 56.604ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipAsync (JsonApiDotNetCoreExample) in 56.604ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 74.256ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 74.256ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?unknownKey=value -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?unknownKey=value -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '154c85f6-801d-4115-8e42-da8fe75f1bea' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: [unknownKey, value] is not a valid query. - at JsonApiDotNetCore.Services.QueryParser.Parse(IQueryCollection query) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 75 - at JsonApiDotNetCore.Services.JsonApiContext.ApplyContext[T](Object controller) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/JsonApiContext.cs:line 70 - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 56 - at JsonApiDotNetCore.Controllers.JsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 40 - at JsonApiDotNetCore.Controllers.JsonApiController`1..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 17 - at JsonApiDotNetCoreExample.Controllers.TodoItemsController..ctor(IJsonApiContext jsonApiContext, IResourceService`1 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs:line 14 - at lambda_method(Closure , IServiceProvider , Object[] ) - at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.g__CreateController|0(ControllerContext controllerContext) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: [unknownKey, value] is not a valid query. - at JsonApiDotNetCore.Services.QueryParser.Parse(IQueryCollection query) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 75 - at JsonApiDotNetCore.Services.JsonApiContext.ApplyContext[T](Object controller) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/JsonApiContext.cs:line 70 - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 56 - at JsonApiDotNetCore.Controllers.JsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 40 - at JsonApiDotNetCore.Controllers.JsonApiController`1..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 17 - at JsonApiDotNetCoreExample.Controllers.TodoItemsController..ctor(IJsonApiContext jsonApiContext, IResourceService`1 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs:line 14 - at lambda_method(Closure , IServiceProvider , Object[] ) - at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.g__CreateController|0(ControllerContext controllerContext) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 4.858ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 4.858ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 24.057ms 400 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 24.057ms 400 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2614?fields[todo-items]=description,created-date -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2614?fields[todo-items]=description,created-date -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id 'ce1f18f1-2c9d-469e-8706-cdda1d627b0c' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '736779bb-b124-40ac-a9e5-58f8ea4bdcc3' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2614) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2614) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem model in DbSet - where bool new TodoItem{ - Id = [model].Id, - Description = [model].Description, - CreatedDate = [model].CreatedDate - } - .Id.Equals((object)__id_0) - select new TodoItem{ - Id = [model].Id, - Description = [model].Description, - CreatedDate = [model].CreatedDate - } - ).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem model in DbSet - where bool new TodoItem{ - Id = [model].Id, - Description = [model].Description, - CreatedDate = [model].CreatedDate - } - .Id.Equals((object)__id_0) - select new TodoItem{ - Id = [model].Id, - Description = [model].Description, - CreatedDate = [model].CreatedDate - } - ).SingleOrDefault()' -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'where new TodoItem() {Id = [model].Id, Description = [model].Description, CreatedDate = [model].CreatedDate}.Id.Equals(Convert(__id_0, Object))' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'where new TodoItem() {Id = [model].Id, Description = [model].Description, CreatedDate = [model].CreatedDate}.Id.Equals(Convert(__id_0, Object))' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'SingleOrDefault()' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'SingleOrDefault()' could not be translated and will be evaluated locally. -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable _Where( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "model"."Id", "model"."Description", "model"."CreatedDate" - FROM "TodoItems" AS "model", - shaper: ValueBufferShaper), - predicate: (ValueBuffer model) => bool new TodoItem{ - Id = int TryReadValue(model, 0, TodoItem.Id), - Description = string TryReadValue(model, 1, TodoItem.Description), - CreatedDate = DateTime TryReadValue(model, 2, TodoItem.CreatedDate) - } - .Id.Equals((object)int GetParameterValue( - queryContext: queryContext, - parameterName: "__id_0"))), - selector: (ValueBuffer model) => new TodoItem{ - Id = int TryReadValue(model, 0, TodoItem.Id), - Description = string TryReadValue(model, 1, TodoItem.Description), - CreatedDate = DateTime TryReadValue(model, 2, TodoItem.CreatedDate) - } - ), - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."Description", "model"."CreatedDate" - FROM "TodoItems" AS "model" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."Description", "model"."CreatedDate" - FROM "TodoItems" AS "model" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "model"."Id", "model"."Description", "model"."CreatedDate" - FROM "TodoItems" AS "model" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 105.374ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 105.374ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 125.325ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 125.325ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - 'from TodoItem t in DbSet - where [t].Id == 2615 - select new TodoItem{ - Id = [t].Id, - Description = [t].Description, - CreatedDate = [t].CreatedDate, - AchievedDate = [t].AchievedDate - } - ' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - 'from TodoItem t in DbSet - where [t].Id == 2615 - select new TodoItem{ - Id = [t].Id, - Description = [t].Description, - CreatedDate = [t].CreatedDate, - AchievedDate = [t].AchievedDate - } - ' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."Description", "t"."CreatedDate", "t"."AchievedDate" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = 2615, - shaper: TypedProjectionShaper), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem t in DbSet - where [t].Id == __todoItem_Id_0 - select new TodoItem{ - Id = [t].Id, - Description = [t].Description, - CreatedDate = [t].CreatedDate, - AchievedDate = [t].AchievedDate - } - ).First()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem t in DbSet - where [t].Id == __todoItem_Id_0 - select new TodoItem{ - Id = [t].Id, - Description = [t].Description, - CreatedDate = [t].CreatedDate, - AchievedDate = [t].AchievedDate - } - ).First()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task First( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."Description", "t"."CreatedDate", "t"."AchievedDate" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1, - shaper: TypedProjectionShaper), - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."Description", "t"."CreatedDate", "t"."AchievedDate" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."Description", "t"."CreatedDate", "t"."AchievedDate" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."Description", "t"."CreatedDate", "t"."AchievedDate" - FROM "TodoItems" AS "t" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2616 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2616 application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id '99416189-fd56-43fd-accb-b675b7d46314' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '7d80e15e-9750-4047-b86c-88bfc61fd12f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2616, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2616, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (11ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 95.019ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 95.019ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 116.16ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 116.16ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem t in - (from TodoItem _1 in DbSet - select [_1]) - .AsNoTracking() - .Include("Owner") - where [t].Id == __todoItem_Id_0 - select [t]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_1].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem t in DbSet - join Person t.Owner in DbSet - on Property([t], "OwnerId") equals (Nullable)Property([t.Owner], "Id") into t.Owner_group - from Person t.Owner in - (from Person t.Owner_groupItem in [t.Owner_group] - select [t.Owner_groupItem]).DefaultIfEmpty() - where [t].Id == __todoItem_Id_0 - select TodoItem _Include( - queryContext: queryContext, - entity: [t], - included: new object[]{ [t.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - return !(bool ReferenceEquals(included[0], null)) ? - { - entity.Owner = (Person)included[0] - return bool ClrICollectionAccessor, TodoItem>.Add( - instance: included[0], - value: entity) - } - : default(bool) - } - )).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _ToSequence(TodoItem SingleOrDefault(IEnumerable _Select( - source: IEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - return !(bool ReferenceEquals(included[0], null)) ? - { - entity.Owner = (Person)included[0] - return bool ClrICollectionAccessor, TodoItem>.Add( - instance: included[0], - value: entity) - } - : default(bool) - } - )))), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2716 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2716 application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample)' with id '2a9a328a-ccd2-441f-86b9-778e783257c7' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id 'f400e30f-a558-41ca-9432-b889d803f5d2' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2716, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) with arguments (2716, JsonApiDotNetCoreExample.Models.TodoItem) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.NotFoundResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 404 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 404 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 27.817ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample) in 27.817ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 47.257ms 404 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 47.257ms 404 -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2617/relationships/owner application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/todo-items/2617/relationships/owner application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}/relationships/{relationshipName}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetRelationshipsAsync (JsonApiDotNetCoreExample)' with id '3fde0ec7-9039-455f-910c-e568544f788a' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) with arguments (2617, owner, System.Collections.Generic.List`1[JsonApiDotNetCore.Models.DocumentData]) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) with arguments (2617, owner, System.Collections.Generic.List`1[JsonApiDotNetCore.Models.DocumentData]) - ModelState is Valid -dbug: JsonApiDotNetCore.Data.DefaultEntityRepository[0] - [JADN] GetAndIncludeAsync(2617, Owner) -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in - (from TodoItem _1 in DbSet - select [_1]).Include("Owner") - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_1].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - join Person e.Owner in DbSet - on Property([e], "OwnerId") equals (Nullable)Property([e.Owner], "Id") into e.Owner_group - from Person e.Owner in - (from Person e.Owner_groupItem in [e.Owner_group] - select [e.Owner_groupItem]).DefaultIfEmpty() - where bool [e].Id.Equals((object)__id_0) - select TodoItem _Include( - queryContext: queryContext, - entity: [e], - included: new object[]{ [e.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (12ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (12ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person x in DbSet - where __First_0 == [x].StringId - select [x]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person x in DbSet - where __First_0 == [x].StringId - select [x]).SingleOrDefault()' -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'where (__First_0 == [x].StringId)' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'where (__First_0 == [x].StringId)' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'SingleOrDefault()' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'SingleOrDefault()' could not be translated and will be evaluated locally. -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ToSequence(Person SingleOrDefault(IEnumerable _Where( - source: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "x"."Id", "x"."FirstName", "x"."LastName" - FROM "People" AS "x", - shaper: UnbufferedEntityShaper), - predicate: (Person x) => string GetParameterValue( - queryContext: queryContext, - parameterName: "__First_0") == x.StringId))), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."FirstName", "x"."LastName" - FROM "People" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."FirstName", "x"."LastName" - FROM "People" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."FirstName", "x"."LastName" - FROM "People" AS "x" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchRelationshipsAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) in 128.36ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) in 128.36ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 147.825ms 200 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 147.825ms 200 -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem t in - (from TodoItem t in DbSet - select [t]).Include("Owner") - where [t].Id == __todoItem_Id_0 - select [t]).Single()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[t].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem t in DbSet - join Person t.Owner in DbSet - on Property([t], "OwnerId") equals (Nullable)Property([t.Owner], "Id") into t.Owner_group - from Person t.Owner in - (from Person t.Owner_groupItem in [t.Owner_group] - select [t.Owner_groupItem]).DefaultIfEmpty() - where [t].Id == __todoItem_Id_0 - select TodoItem _Include( - queryContext: queryContext, - entity: [t], - included: new object[]{ [t.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )).Single()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ToSequence(TodoItem Single(IEnumerable _Select( - source: IEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )))), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__todoItem_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - WHERE "t"."Id" = @__todoItem_Id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/people/887/relationships/todo-items application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 PATCH http://localhost/api/v1/people/887/relationships/todo-items application/vnd.api+json -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people/{id}/relationships/{relationshipName}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.GetRelationshipsAsync (JsonApiDotNetCoreExample)' with id '55bc06aa-666a-4e45-9dba-c3c04b1e2592' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) -dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder[1] - Selected input formatter 'JsonApiDotNetCore.Formatters.JsonApiInputFormatter' for content type 'application/vnd.api+json'. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) with arguments (887, todo-items, System.Collections.Generic.List`1[JsonApiDotNetCore.Models.DocumentData]) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) with arguments (887, todo-items, System.Collections.Generic.List`1[JsonApiDotNetCore.Models.DocumentData]) - ModelState is Valid -dbug: JsonApiDotNetCore.Data.DefaultEntityRepository[0] - [JADN] GetAndIncludeAsync(887, TodoItems) -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person e in - (from Person _1 in DbSet - select [_1]).Include("TodoItems") - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_1].TodoItems' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - order by (Nullable)EF.Property(?[e]?, "Id") asc - select Task _IncludeAsync( - queryContext: queryContext, - entity: [e], - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => - from TodoItem e.TodoItems in DbSet - join AnonymousObject _e in - (from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - order by (Nullable)EF.Property(?[e]?, "Id") asc - select new AnonymousObject(new object[]{ (object)EF.Property(?[e]?, "Id") })).Take(1) - on Property([e.TodoItems], "OwnerId") equals (Nullable)object [_e].GetValue(0) - order by object [_e].GetValue(0) asc - select [e.TodoItems], - cancellationToken: ct) - } - , - cancellationToken: ct).Result).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _SelectAsync( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 2, - shaper: BufferedEntityShaper), - selector: (Person e | CancellationToken ct) => Task _ExecuteAsync( - taskFactories: new Func>[]{ () => Task _ToObjectTask(Task _IncludeAsync( - queryContext: queryContext, - entity: e, - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id", - shaper: BufferedEntityShaper), - cancellationToken: ct) - } - , - cancellationToken: Unhandled parameter: ct)) }, - selector: (Object[] results) => (Person)results[0])), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - 'from TodoItem x in DbSet - where - (from string _1 in __relationshipIds_0 - select [_1]).Contains([x].StringId) - select [x]' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - 'from TodoItem x in DbSet - where - (from string _1 in __relationshipIds_0 - select [_1]).Contains([x].StringId) - select [x]' -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'where {__relationshipIds_0 => Contains([x].StringId)}' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'where {__relationshipIds_0 => Contains([x].StringId)}' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'Contains([x].StringId)' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'Contains([x].StringId)' could not be translated and will be evaluated locally. -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _Where( - source: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x", - shaper: UnbufferedEntityShaper), - predicate: (TodoItem x) => bool Contains( - source: IEnumerable GetParameterValue( - queryContext: queryContext, - parameterName: "__relationshipIds_0"), - value: x.StringId)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "x"."Id", "x"."AchievedDate", "x"."AssigneeId", "x"."CollectionId", "x"."CreatedDate", "x"."Description", "x"."GuidProperty", "x"."Ordinal", "x"."OwnerId" - FROM "TodoItems" AS "x" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30'] - UPDATE "TodoItems" SET "OwnerId" = @p0 - WHERE "Id" = @p1; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.PatchRelationshipsAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkResult. -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1] - Executing HttpStatusCodeResult, setting HTTP status code 200 -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) in 222.821ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.PatchRelationshipsAsync (JsonApiDotNetCoreExample) in 222.821ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 254.919ms 200 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 254.919ms 200 -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person p in - (from Person p in DbSet - select [p]).Include("TodoItems") - where [p].Id == __person_Id_0 - select [p]).Single()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[p].TodoItems' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person p in DbSet - where [p].Id == __person_Id_0 - order by (Nullable)EF.Property(?[p]?, "Id") asc - select Person _Include( - queryContext: queryContext, - entity: [p], - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Void queryContext.QueryBuffer.IncludeCollection( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: () => - from TodoItem p.TodoItems in DbSet - join AnonymousObject _p in - (from Person p in DbSet - where [p].Id == __person_Id_0 - order by (Nullable)EF.Property(?[p]?, "Id") asc - select new AnonymousObject(new object[]{ (object)EF.Property(?[p]?, "Id") })).Take(1) - on Property([p.TodoItems], "OwnerId") equals (Nullable)object [_p].GetValue(0) - order by object [_p].GetValue(0) asc - select [p.TodoItems]) - } - )).Single()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ToSequence(Person Single(IEnumerable _Select( - source: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - WHERE "p"."Id" = @__person_Id_0 - ORDER BY "p"."Id" - LIMIT 2, - shaper: BufferedEntityShaper), - selector: (Person p) => Person _Include( - queryContext: queryContext, - entity: p, - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Void queryContext.QueryBuffer.IncludeCollection( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: () => IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - WHERE "p0"."Id" = @__person_Id_0 - ORDER BY "p0"."Id" - LIMIT 1 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id", - shaper: BufferedEntityShaper)) - } - )))), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__person_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - WHERE "p"."Id" = @__person_Id_0 - ORDER BY "p"."Id" - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__person_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - WHERE "p"."Id" = @__person_Id_0 - ORDER BY "p"."Id" - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__person_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - WHERE "p"."Id" = @__person_Id_0 - ORDER BY "p"."Id" - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__person_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - WHERE "p0"."Id" = @__person_Id_0 - ORDER BY "p0"."Id" - LIMIT 1 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__person_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - WHERE "p0"."Id" = @__person_Id_0 - ORDER BY "p0"."Id" - LIMIT 1 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__person_Id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - WHERE "p0"."Id" = @__person_Id_0 - ORDER BY "p0"."Id" - LIMIT 1 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - 'from Person _0 in DbSet - select [_0]' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - 'from Person _0 in DbSet - select [_0]' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p", - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p0; - DELETE FROM "People" - WHERE "Id" = @p1; - DELETE FROM "People" - WHERE "Id" = @p2; - DELETE FROM "People" - WHERE "Id" = @p3; - DELETE FROM "People" - WHERE "Id" = @p4; - DELETE FROM "People" - WHERE "Id" = @p5; - DELETE FROM "People" - WHERE "Id" = @p6; - DELETE FROM "People" - WHERE "Id" = @p7; - DELETE FROM "People" - WHERE "Id" = @p8; - DELETE FROM "People" - WHERE "Id" = @p9; - DELETE FROM "People" - WHERE "Id" = @p10; - DELETE FROM "People" - WHERE "Id" = @p11; - DELETE FROM "People" - WHERE "Id" = @p12; - DELETE FROM "People" - WHERE "Id" = @p13; - DELETE FROM "People" - WHERE "Id" = @p14; - DELETE FROM "People" - WHERE "Id" = @p15; - DELETE FROM "People" - WHERE "Id" = @p16; - DELETE FROM "People" - WHERE "Id" = @p17; - DELETE FROM "People" - WHERE "Id" = @p18; - DELETE FROM "People" - WHERE "Id" = @p19; - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p20, @p21) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p0; - DELETE FROM "People" - WHERE "Id" = @p1; - DELETE FROM "People" - WHERE "Id" = @p2; - DELETE FROM "People" - WHERE "Id" = @p3; - DELETE FROM "People" - WHERE "Id" = @p4; - DELETE FROM "People" - WHERE "Id" = @p5; - DELETE FROM "People" - WHERE "Id" = @p6; - DELETE FROM "People" - WHERE "Id" = @p7; - DELETE FROM "People" - WHERE "Id" = @p8; - DELETE FROM "People" - WHERE "Id" = @p9; - DELETE FROM "People" - WHERE "Id" = @p10; - DELETE FROM "People" - WHERE "Id" = @p11; - DELETE FROM "People" - WHERE "Id" = @p12; - DELETE FROM "People" - WHERE "Id" = @p13; - DELETE FROM "People" - WHERE "Id" = @p14; - DELETE FROM "People" - WHERE "Id" = @p15; - DELETE FROM "People" - WHERE "Id" = @p16; - DELETE FROM "People" - WHERE "Id" = @p17; - DELETE FROM "People" - WHERE "Id" = @p18; - DELETE FROM "People" - WHERE "Id" = @p19; - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p20, @p21) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p0; - DELETE FROM "People" - WHERE "Id" = @p1; - DELETE FROM "People" - WHERE "Id" = @p2; - DELETE FROM "People" - WHERE "Id" = @p3; - DELETE FROM "People" - WHERE "Id" = @p4; - DELETE FROM "People" - WHERE "Id" = @p5; - DELETE FROM "People" - WHERE "Id" = @p6; - DELETE FROM "People" - WHERE "Id" = @p7; - DELETE FROM "People" - WHERE "Id" = @p8; - DELETE FROM "People" - WHERE "Id" = @p9; - DELETE FROM "People" - WHERE "Id" = @p10; - DELETE FROM "People" - WHERE "Id" = @p11; - DELETE FROM "People" - WHERE "Id" = @p12; - DELETE FROM "People" - WHERE "Id" = @p13; - DELETE FROM "People" - WHERE "Id" = @p14; - DELETE FROM "People" - WHERE "Id" = @p15; - DELETE FROM "People" - WHERE "Id" = @p16; - DELETE FROM "People" - WHERE "Id" = @p17; - DELETE FROM "People" - WHERE "Id" = @p18; - DELETE FROM "People" - WHERE "Id" = @p19; - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p20, @p21) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p28; - DELETE FROM "People" - WHERE "Id" = @p29; - DELETE FROM "People" - WHERE "Id" = @p30; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p31, @p32, @p33, @p34, @p35, @p36, @p37, @p38) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p39, @p40, @p41, @p42, @p43, @p44, @p45, @p46) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p28; - DELETE FROM "People" - WHERE "Id" = @p29; - DELETE FROM "People" - WHERE "Id" = @p30; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p31, @p32, @p33, @p34, @p35, @p36, @p37, @p38) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p39, @p40, @p41, @p42, @p43, @p44, @p45, @p46) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p28; - DELETE FROM "People" - WHERE "Id" = @p29; - DELETE FROM "People" - WHERE "Id" = @p30; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p31, @p32, @p33, @p34, @p35, @p36, @p37, @p38) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p39, @p40, @p41, @p42, @p43, @p44, @p45, @p46) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '5d8ec96c-5e08-48d8-8af5-20d91d1acfd0' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[_2].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Include("Owner") - .Count()' -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[_2].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _3 in DbSet - select [_3]) - .Include("Owner") - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _3 in DbSet select [_3]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _3 in DbSet select [_3]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_3].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _3 in DbSet - join Person t.Owner in DbSet - on Property([_3], "OwnerId") equals (Nullable)Property([t.Owner], "Id") into t.Owner_group - from Person t.Owner in - (from Person t.Owner_groupItem in [t.Owner_group] - select [t.Owner_groupItem]).DefaultIfEmpty() - select TodoItem _Include( - queryContext: queryContext, - entity: [_3], - included: new object[]{ [t.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 76.304ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 76.304ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 96.232ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 96.232ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (0ms) [Parameters=[@p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (0ms) [Parameters=[@p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '5b834c60-041f-4099-83c5-05901ad2c3a8' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Include("Owner") - .Count()' -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[_2].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[_2].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _3 in DbSet - select [_3]) - .Include("Owner") - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _3 in DbSet select [_3]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _3 in DbSet select [_3]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_3].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _3 in DbSet - join Person t.Owner in DbSet - on Property([_3], "OwnerId") equals (Nullable)Property([t.Owner], "Id") into t.Owner_group - from Person t.Owner in - (from Person t.Owner_groupItem in [t.Owner_group] - select [t.Owner_groupItem]).DefaultIfEmpty() - select TodoItem _Include( - queryContext: queryContext, - entity: [_3], - included: new object[]{ [t.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId", "t.Owner"."Id", "t.Owner"."FirstName", "t.Owner"."LastName" - FROM "TodoItems" AS "t" - LEFT JOIN "People" AS "t.Owner" ON "t"."OwnerId" = "t.Owner"."Id" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 80.648ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 80.648ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 100.942ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 100.942ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _1 in DbSet - select [_1]).First()' -warn: Microsoft.EntityFrameworkCore.Query[10103] - Query: '(from Person _1 in DbSet select [_1]).First()' uses First/FirstOrDefault operation without OrderBy and filter which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10103] - Query: '(from Person _1 in DbSet select [_1]).First()' uses First/FirstOrDefault operation without OrderBy and filter which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _1 in DbSet - select [_1]).First()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ToSequence(Person First(IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT 1, - shaper: UnbufferedEntityShaper))), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/888?include=non-existent-relationship -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/888?include=non-existent-relationship -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PatchAsync (JsonApiDotNetCoreExample)' with id 'e3d89928-9c88-496c-b73a-f712ea6b3a37' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.DeleteAsync (JsonApiDotNetCoreExample)' with id '0564ca1d-138d-4994-89ff-4c633b77efa6' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (888) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (888) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Invalid relationship non-existent-relationship on people - at JsonApiDotNetCore.Data.DefaultEntityRepository`2.Include(IQueryable`1 entities, String relationshipName) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs:line 139 - at JsonApiDotNetCore.Services.EntityResourceService`2.<>c__DisplayClass7_0.b__0(String r) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 77 - at System.Collections.Generic.List`1.ForEach(Action`1 action) - at JsonApiDotNetCore.Services.EntityResourceService`2.d__7.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 75 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Services.EntityResourceService`2.d__5.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 63 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2.d__13.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 118 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.JsonApiController`2.d__4.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 65 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Invalid relationship non-existent-relationship on people - at JsonApiDotNetCore.Data.DefaultEntityRepository`2.Include(IQueryable`1 entities, String relationshipName) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs:line 139 - at JsonApiDotNetCore.Services.EntityResourceService`2.<>c__DisplayClass7_0.b__0(String r) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 77 - at System.Collections.Generic.List`1.ForEach(Action`1 action) - at JsonApiDotNetCore.Services.EntityResourceService`2.d__7.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 75 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Services.EntityResourceService`2.d__5.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/EntityResourceService.cs:line 63 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2.d__13.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 118 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() - at JsonApiDotNetCore.Controllers.JsonApiController`2.d__4.MoveNext() in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 65 ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 14.734ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 14.734ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 32.884ms 400 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 32.884ms 400 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2622?include=owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2622?include=owner -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '2e60476c-d745-4d1d-9734-3048cf0e06f7' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '892e3c0c-6a62-4b84-bc3b-630712d4abda' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2622) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2622) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]) - .Include("Owner") - .FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - join Person e.Owner in DbSet - on Property([e], "OwnerId") equals (Nullable)Property([e.Owner], "Id") into e.Owner_group - from Person e.Owner in - (from Person e.Owner_groupItem in [e.Owner_group] - select [e.Owner_groupItem]).DefaultIfEmpty() - where bool [e].Id.Equals((object)__id_0) - select TodoItem _Include( - queryContext: queryContext, - entity: [e], - included: new object[]{ [e.Owner] }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task FirstOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>), - selector: (TransparentIdentifier t1) => TodoItem _Include( - queryContext: queryContext, - entity: t1.Outer, - included: new object[]{ t1.Inner }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - return !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - } - )), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 68.602ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 68.602ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 92.782ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 92.782ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/891?include=todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/891?include=todo-items -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PatchAsync (JsonApiDotNetCoreExample)' with id '422cb7bd-76e2-4921-a970-fd3b6e53cbc5' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.DeleteAsync (JsonApiDotNetCoreExample)' with id '704b8366-e2fb-4047-91ac-ef75d37aadf9' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (891) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (891) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]) - .Include("TodoItems") - .FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].TodoItems' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - order by (Nullable)EF.Property(?[e]?, "Id") asc - select Task _IncludeAsync( - queryContext: queryContext, - entity: [e], - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => - from TodoItem e.TodoItems in DbSet - join AnonymousObject _e in - (from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - order by (Nullable)EF.Property(?[e]?, "Id") asc - select new AnonymousObject(new object[]{ (object)EF.Property(?[e]?, "Id") })).Take(1) - on Property([e.TodoItems], "OwnerId") equals (Nullable)object [_e].GetValue(0) - order by object [_e].GetValue(0) asc - select [e.TodoItems], - cancellationToken: ct) - } - , - cancellationToken: ct).Result).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task FirstOrDefault( - source: IAsyncEnumerable _SelectAsync( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1, - shaper: BufferedEntityShaper), - selector: (Person e | CancellationToken ct) => Task _ExecuteAsync( - taskFactories: new Func>[]{ () => Task _ToObjectTask(Task _IncludeAsync( - queryContext: queryContext, - entity: e, - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id", - shaper: BufferedEntityShaper), - cancellationToken: ct) - } - , - cancellationToken: Unhandled parameter: ct)) }, - selector: (Object[] results) => (Person)results[0])), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 121.247ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 121.247ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 140.619ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 140.619ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/888?include=owner.name -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/888?include=owner.name -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PatchAsync (JsonApiDotNetCoreExample)' with id 'b46d9cb1-c51a-434d-9ecd-e4dd6d0d699f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.DeleteAsync (JsonApiDotNetCoreExample)' with id '2deec43b-6907-4519-a36a-21a2dbd0b0f6' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Deeply nested relationships are not supported - at JsonApiDotNetCore.Services.QueryParser.ParseIncludedRelationships(String value) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 176 - at JsonApiDotNetCore.Services.QueryParser.Parse(IQueryCollection query) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 57 - at JsonApiDotNetCore.Services.JsonApiContext.ApplyContext[T](Object controller) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/JsonApiContext.cs:line 70 - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 56 - at JsonApiDotNetCore.Controllers.JsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 40 - at JsonApiDotNetCore.Controllers.JsonApiController`1..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 17 - at JsonApiDotNetCoreExample.Controllers.PeopleController..ctor(IJsonApiContext jsonApiContext, IResourceService`1 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/Examples/JsonApiDotNetCoreExample/Controllers/PeopleController.cs:line 14 - at lambda_method(Closure , IServiceProvider , Object[] ) - at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.g__CreateController|0(ControllerContext controllerContext) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0] - An unhandled exception occurred during the request -JsonApiDotNetCore.Internal.JsonApiException: Deeply nested relationships are not supported - at JsonApiDotNetCore.Services.QueryParser.ParseIncludedRelationships(String value) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 176 - at JsonApiDotNetCore.Services.QueryParser.Parse(IQueryCollection query) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/QueryParser.cs:line 57 - at JsonApiDotNetCore.Services.JsonApiContext.ApplyContext[T](Object controller) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Services/JsonApiContext.cs:line 70 - at JsonApiDotNetCore.Controllers.BaseJsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs:line 56 - at JsonApiDotNetCore.Controllers.JsonApiController`2..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 40 - at JsonApiDotNetCore.Controllers.JsonApiController`1..ctor(IJsonApiContext jsonApiContext, IResourceService`2 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/JsonApiDotNetCore/Controllers/JsonApiController.cs:line 17 - at JsonApiDotNetCoreExample.Controllers.PeopleController..ctor(IJsonApiContext jsonApiContext, IResourceService`1 resourceService, ILoggerFactory loggerFactory) in /Users/jarednance/dev/json-api-dotnet-core/src/Examples/JsonApiDotNetCoreExample/Controllers/PeopleController.cs:line 14 - at lambda_method(Closure , IServiceProvider , Object[] ) - at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.g__CreateController|0(ControllerContext controllerContext) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) - at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext() ---- End of stack trace from previous location where exception was thrown --- - at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) - at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext() -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 5.157ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 5.157ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 25.495ms 400 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 25.495ms 400 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p2, @p3, @p4); -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p2, @p3, @p4); -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItemCollections" ("Id", "Name", "OwnerId") - VALUES (@p2, @p3, @p4); -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/892?include=todo-items,todo-collections -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/892?include=todo-items,todo-collections -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PatchAsync (JsonApiDotNetCoreExample)' with id '3f6bab1b-ca52-4fbd-a8c4-dee3c0df1851' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.DeleteAsync (JsonApiDotNetCoreExample)' with id '0c5a6576-2492-4aff-80c7-4f36a82e8d14' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (892) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (892) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]) - .Include("TodoItems") - .Include("TodoItemCollections") - .FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].TodoItems' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].TodoItemCollections' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - order by (Nullable)EF.Property(?[e]?, "Id") asc - select Task _IncludeAsync( - queryContext: queryContext, - entity: [e], - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task _AwaitMany(new Func[] - { - () => Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => - from TodoItem e.TodoItems in DbSet - join AnonymousObject _e in - (from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - order by (Nullable)EF.Property(?[e]?, "Id") asc - select new AnonymousObject(new object[]{ (object)EF.Property(?[e]?, "Id") })).Take(1) - on Property([e.TodoItems], "OwnerId") equals (Nullable)object [_e].GetValue(0) - order by object [_e].GetValue(0) asc - select [e.TodoItems], - cancellationToken: ct), - () => Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 1, - navigation: Person.TodoItemCollections, - inverseNavigation: TodoItemCollection.Owner, - targetEntityType: EntityType: TodoItemCollection, - clrCollectionAccessor: ClrICollectionAccessor, TodoItemCollection>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => - from TodoItemCollection e.TodoItemCollections in DbSet - join AnonymousObject _e in - (from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - order by (Nullable)EF.Property(?[e]?, "Id") asc - select new AnonymousObject(new object[]{ (object)EF.Property(?[e]?, "Id") })).Take(1) - on Property([e.TodoItemCollections], "OwnerId") equals (Nullable)object [_e].GetValue(0) - order by object [_e].GetValue(0) asc - select [e.TodoItemCollections], - cancellationToken: ct) - }) - } - , - cancellationToken: ct).Result).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task FirstOrDefault( - source: IAsyncEnumerable _SelectAsync( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1, - shaper: BufferedEntityShaper), - selector: (Person e | CancellationToken ct) => Task _ExecuteAsync( - taskFactories: new Func>[]{ () => Task _ToObjectTask(Task _IncludeAsync( - queryContext: queryContext, - entity: e, - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task _AwaitMany(new Func[] - { - () => Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id", - shaper: BufferedEntityShaper), - cancellationToken: ct), - () => Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 1, - navigation: Person.TodoItemCollections, - inverseNavigation: TodoItemCollection.Owner, - targetEntityType: EntityType: TodoItemCollection, - clrCollectionAccessor: ClrICollectionAccessor, TodoItemCollection>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e.TodoItemCollections"."Id", "e.TodoItemCollections"."Name", "e.TodoItemCollections"."OwnerId" - FROM "TodoItemCollections" AS "e.TodoItemCollections" - INNER JOIN ( - SELECT "e1"."Id" - FROM "People" AS "e1" - WHERE "e1"."Id" = @__id_0 - ORDER BY "e1"."Id" - LIMIT 1 - ) AS "t0" ON "e.TodoItemCollections"."OwnerId" = "t0"."Id" - ORDER BY "t0"."Id", - shaper: BufferedEntityShaper), - cancellationToken: ct) - }) - } - , - cancellationToken: Unhandled parameter: ct)) }, - selector: (Object[] results) => (Person)results[0])), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - ORDER BY "e"."Id" - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItems"."Id", "e.TodoItems"."AchievedDate", "e.TodoItems"."AssigneeId", "e.TodoItems"."CollectionId", "e.TodoItems"."CreatedDate", "e.TodoItems"."Description", "e.TodoItems"."GuidProperty", "e.TodoItems"."Ordinal", "e.TodoItems"."OwnerId" - FROM "TodoItems" AS "e.TodoItems" - INNER JOIN ( - SELECT "e0"."Id" - FROM "People" AS "e0" - WHERE "e0"."Id" = @__id_0 - ORDER BY "e0"."Id" - LIMIT 1 - ) AS "t" ON "e.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItemCollections"."Id", "e.TodoItemCollections"."Name", "e.TodoItemCollections"."OwnerId" - FROM "TodoItemCollections" AS "e.TodoItemCollections" - INNER JOIN ( - SELECT "e1"."Id" - FROM "People" AS "e1" - WHERE "e1"."Id" = @__id_0 - ORDER BY "e1"."Id" - LIMIT 1 - ) AS "t0" ON "e.TodoItemCollections"."OwnerId" = "t0"."Id" - ORDER BY "t0"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItemCollections"."Id", "e.TodoItemCollections"."Name", "e.TodoItemCollections"."OwnerId" - FROM "TodoItemCollections" AS "e.TodoItemCollections" - INNER JOIN ( - SELECT "e1"."Id" - FROM "People" AS "e1" - WHERE "e1"."Id" = @__id_0 - ORDER BY "e1"."Id" - LIMIT 1 - ) AS "t0" ON "e.TodoItemCollections"."OwnerId" = "t0"."Id" - ORDER BY "t0"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e.TodoItemCollections"."Id", "e.TodoItemCollections"."Name", "e.TodoItemCollections"."OwnerId" - FROM "TodoItemCollections" AS "e.TodoItemCollections" - INNER JOIN ( - SELECT "e1"."Id" - FROM "People" AS "e1" - WHERE "e1"."Id" = @__id_0 - ORDER BY "e1"."Id" - LIMIT 1 - ) AS "t0" ON "e.TodoItemCollections"."OwnerId" = "t0"."Id" - ORDER BY "t0"."Id" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 129.696ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 129.696ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 149.864ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 149.864ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p0; - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p1, @p2) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p0; - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p1, @p2) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p0; - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p1, @p2) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p15; - DELETE FROM "People" - WHERE "Id" = @p16; - DELETE FROM "People" - WHERE "Id" = @p17; - DELETE FROM "People" - WHERE "Id" = @p18; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p15; - DELETE FROM "People" - WHERE "Id" = @p16; - DELETE FROM "People" - WHERE "Id" = @p17; - DELETE FROM "People" - WHERE "Id" = @p18; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p15; - DELETE FROM "People" - WHERE "Id" = @p16; - DELETE FROM "People" - WHERE "Id" = @p17; - DELETE FROM "People" - WHERE "Id" = @p18; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2633?include=owner&include=assignee -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2633?include=owner&include=assignee -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '49eb2ce9-b9a4-4b60-8f0d-9dc16928dad7' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '0d5cc266-1ec4-468a-84c2-4323d7e9b49c' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2633) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]) - .Include("Owner") - .Include("Assignee") - .FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].Owner' -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[e].Assignee' -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2633) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - join Person e.Assignee in DbSet - on Property([e], "AssigneeId") equals (Nullable)Property([e.Assignee], "Id") into e.Assignee_group - from Person e.Assignee in - (from Person e.Assignee_groupItem in [e.Assignee_group] - select [e.Assignee_groupItem]).DefaultIfEmpty() - join Person e.Owner in DbSet - on Property([e], "OwnerId") equals (Nullable)Property([e.Owner], "Id") into e.Owner_group - from Person e.Owner in - (from Person e.Owner_groupItem in [e.Owner_group] - select [e.Owner_groupItem]).DefaultIfEmpty() - where bool [e].Id.Equals((object)__id_0) - select TodoItem _Include( - queryContext: queryContext, - entity: [e], - included: new object[] - { - [e.Owner], - [e.Assignee] - }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - return !(bool ReferenceEquals(included[1], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[1], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Assignee, - entity: entity, - value: included[1]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.AssignedTodoItems, - entity: included[1], - value: entity) - } - : default(Void) - } - )).FirstOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task FirstOrDefault( - source: IAsyncEnumerable _Select( - source: IAsyncEnumerable, Person>> _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Assignee"."Id", "e.Assignee"."FirstName", "e.Assignee"."LastName", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Assignee" ON "e"."AssigneeId" = "e.Assignee"."Id" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1, - shaper: TypedCompositeShaper, TodoItem, BufferedOffsetEntityShaper, Person, TransparentIdentifier>, TransparentIdentifier, BufferedOffsetEntityShaper, Person, TransparentIdentifier, Person>>), - selector: (TransparentIdentifier, Person> t3) => TodoItem _Include( - queryContext: queryContext, - entity: t3.Outer.Outer, - included: new object[] - { - t3.Inner, - t3.Outer.Inner - }, - fixup: (QueryContext queryContext | TodoItem entity | Object[] included) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: TodoItem) - !(bool ReferenceEquals(included[0], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[0], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Owner, - entity: entity, - value: included[0]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.TodoItems, - entity: included[0], - value: entity) - } - : default(Void) - return !(bool ReferenceEquals(included[1], null)) ? - { - Void queryContext.QueryBuffer.StartTracking( - entity: included[1], - entityType: EntityType: Person) - Void SetRelationshipSnapshotValue( - stateManager: queryContext.StateManager, - navigation: TodoItem.Assignee, - entity: entity, - value: included[1]) - return Void AddToCollectionSnapshot( - stateManager: queryContext.StateManager, - navigation: Person.AssignedTodoItems, - entity: included[1], - value: entity) - } - : default(Void) - } - )), - cancellationToken: Unhandled parameter: queryContext.CancellationToken)), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Assignee"."Id", "e.Assignee"."FirstName", "e.Assignee"."LastName", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Assignee" ON "e"."AssigneeId" = "e.Assignee"."Id" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (15ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Assignee"."Id", "e.Assignee"."FirstName", "e.Assignee"."LastName", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Assignee" ON "e"."AssigneeId" = "e.Assignee"."Id" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (15ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId", "e.Assignee"."Id", "e.Assignee"."FirstName", "e.Assignee"."LastName", "e.Owner"."Id", "e.Owner"."FirstName", "e.Owner"."LastName" - FROM "TodoItems" AS "e" - LEFT JOIN "People" AS "e.Assignee" ON "e"."AssigneeId" = "e.Assignee"."Id" - LEFT JOIN "People" AS "e.Owner" ON "e"."OwnerId" = "e.Owner"."Id" - WHERE "e"."Id" = @__id_0 - LIMIT 1 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 111.286ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 111.286ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 131.712ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 131.712ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p3; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p3; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "People" - WHERE "Id" = @p3; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people?include=todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people?include=todo-items -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PostAsync (JsonApiDotNetCoreExample)' with id '1eaf2dd2-1dd5-46db-ba6f-88148a37f5ec' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _2 in DbSet - select [_2]) - .Include("TodoItems") - .Count()' -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[_2].TodoItems' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _2 in DbSet - select [_2]).Count()' -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[_2].TodoItems' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "People" AS "p"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _3 in DbSet - select [_3]) - .Include("TodoItems") - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _3 in DbSet select [_3]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _3 in DbSet select [_3]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10105] - Including navigation: '[_3].TodoItems' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _3 in DbSet - order by (Nullable)EF.Property(?[_3]?, "Id") asc - select Task _IncludeAsync( - queryContext: queryContext, - entity: [_3], - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => - from TodoItem p.TodoItems in DbSet - join AnonymousObject __3 in - (from Person _3 in DbSet - order by (Nullable)EF.Property(?[_3]?, "Id") asc - select new AnonymousObject(new object[]{ (object)EF.Property(?[_3]?, "Id") })) - .Skip(__p_0) - .Take(__p_1) - on Property([p.TodoItems], "OwnerId") equals (Nullable)object [__3].GetValue(0) - order by object [__3].GetValue(0) asc - select [p.TodoItems], - cancellationToken: ct) - } - , - cancellationToken: ct).Result) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _SelectAsync( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - ORDER BY "p"."Id" - LIMIT @__p_1 OFFSET @__p_0, - shaper: BufferedEntityShaper), - selector: (Person _3 | CancellationToken ct) => Task _ExecuteAsync( - taskFactories: new Func>[]{ () => Task _ToObjectTask(Task _IncludeAsync( - queryContext: queryContext, - entity: _3, - included: new object[]{ }, - fixup: (QueryContext queryContext | Person entity | Object[] included | CancellationToken ct) => - { - Void queryContext.QueryBuffer.StartTracking( - entity: entity, - entityType: EntityType: Person) - return Task queryContext.QueryBuffer.IncludeCollectionAsync( - includeId: 0, - navigation: Person.TodoItems, - inverseNavigation: TodoItem.Owner, - targetEntityType: EntityType: TodoItem, - clrCollectionAccessor: ClrICollectionAccessor, TodoItem>, - inverseClrPropertySetter: ClrPropertySetter, - tracking: True, - instance: entity, - valuesFactory: (Func>)() => IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - ORDER BY "p0"."Id" - LIMIT @__p_1 OFFSET @__p_0 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id", - shaper: BufferedEntityShaper), - cancellationToken: ct) - } - , - cancellationToken: Unhandled parameter: ct)) }, - selector: (Object[] results) => (Person)results[0])), - queryContext: Unhandled parameter: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: Unhandled parameter: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - ORDER BY "p"."Id" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - ORDER BY "p"."Id" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - ORDER BY "p"."Id" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - ORDER BY "p0"."Id" - LIMIT @__p_1 OFFSET @__p_0 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - ORDER BY "p0"."Id" - LIMIT @__p_1 OFFSET @__p_0 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p.TodoItems"."Id", "p.TodoItems"."AchievedDate", "p.TodoItems"."AssigneeId", "p.TodoItems"."CollectionId", "p.TodoItems"."CreatedDate", "p.TodoItems"."Description", "p.TodoItems"."GuidProperty", "p.TodoItems"."Ordinal", "p.TodoItems"."OwnerId" - FROM "TodoItems" AS "p.TodoItems" - INNER JOIN ( - SELECT "p0"."Id" - FROM "People" AS "p0" - ORDER BY "p0"."Id" - LIMIT @__p_1 OFFSET @__p_0 - ) AS "t" ON "p.TodoItems"."OwnerId" = "t"."Id" - ORDER BY "t"."Id" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 91.629ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 91.629ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 111.506ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 111.506ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PostAsync (JsonApiDotNetCoreExample)' with id '101783b6-922d-478e-91c4-973fb0212ed5' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "People" AS "p"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (26ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (26ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 76.867ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 76.867ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 97.983ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 97.983ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id", "CreatedDate"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExampleTests -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '66278d25-d1b4-4a31-8edc-371fd1e02b91' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (9ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 51.071ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 51.071ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 73.957ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 73.957ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?', @p67='?', @p68='?', @p69='?', @p70='?', @p71='?', @p72='?', @p73='?', @p74='?', @p75='?', @p76='?', @p77='?', @p78='?', @p79='?', @p80='?', @p81='?', @p82='?', @p83='?', @p84='?', @p85='?', @p86='?', @p87='?', @p88='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p41, @p42, @p43, @p44, @p45, @p46, @p47, @p48) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p49, @p50, @p51, @p52, @p53, @p54, @p55, @p56) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p57, @p58, @p59, @p60, @p61, @p62, @p63, @p64) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p65, @p66, @p67, @p68, @p69, @p70, @p71, @p72) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p73, @p74, @p75, @p76, @p77, @p78, @p79, @p80) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p81, @p82, @p83, @p84, @p85, @p86, @p87, @p88) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?', @p67='?', @p68='?', @p69='?', @p70='?', @p71='?', @p72='?', @p73='?', @p74='?', @p75='?', @p76='?', @p77='?', @p78='?', @p79='?', @p80='?', @p81='?', @p82='?', @p83='?', @p84='?', @p85='?', @p86='?', @p87='?', @p88='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p41, @p42, @p43, @p44, @p45, @p46, @p47, @p48) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p49, @p50, @p51, @p52, @p53, @p54, @p55, @p56) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p57, @p58, @p59, @p60, @p61, @p62, @p63, @p64) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p65, @p66, @p67, @p68, @p69, @p70, @p71, @p72) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p73, @p74, @p75, @p76, @p77, @p78, @p79, @p80) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p81, @p82, @p83, @p84, @p85, @p86, @p87, @p88) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?', @p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?', @p67='?', @p68='?', @p69='?', @p70='?', @p71='?', @p72='?', @p73='?', @p74='?', @p75='?', @p76='?', @p77='?', @p78='?', @p79='?', @p80='?', @p81='?', @p82='?', @p83='?', @p84='?', @p85='?', @p86='?', @p87='?', @p88='?'], CommandType='Text', CommandTimeout='30'] - DELETE FROM "TodoItems" - WHERE "Id" = @p0; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p41, @p42, @p43, @p44, @p45, @p46, @p47, @p48) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p49, @p50, @p51, @p52, @p53, @p54, @p55, @p56) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p57, @p58, @p59, @p60, @p61, @p62, @p63, @p64) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p65, @p66, @p67, @p68, @p69, @p70, @p71, @p72) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p73, @p74, @p75, @p76, @p77, @p78, @p79, @p80) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p81, @p82, @p83, @p84, @p85, @p86, @p87, @p88) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[number]=2 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[number]=2 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '29149bf5-e575-4822-ae33-beb5fce2ffc6' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 2 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 51.095ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 70.672ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 51.095ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 70.672ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _1 in DbSet - select [_1]).Last()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _1 in DbSet - select [_1]).Last()' -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'Last()' could not be translated and will be evaluated locally. -warn: Microsoft.EntityFrameworkCore.Query[20500] - The LINQ expression 'Last()' could not be translated and will be evaluated locally. -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ToSequence(Person Last(IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p", - shaper: UnbufferedEntityShaper))), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/894 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people/894 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PatchAsync (JsonApiDotNetCoreExample)' with id '1d8d8ad3-300b-4985-9917-0527d2f32c84' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.DeleteAsync (JsonApiDotNetCoreExample)' with id '110246c9-516c-4d15-b9ac-04e6d266b51b' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (894) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments (894) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."FirstName", "e"."LastName" - FROM "People" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 51.526ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 72.584ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 51.526ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 72.584ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2647 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2647 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '5aeb7733-aac0-4b6a-a5b0-622a10aef310' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '3b020693-8812-48be-bf1b-028a704a3f50' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2647) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2647) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 43.935ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 43.935ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 66.007ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 66.007ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PostAsync (JsonApiDotNetCoreExample)' with id '53236a0e-5a42-4405-8697-b363307b0742' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "People" AS "p"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 53.752ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 53.752ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 75.703ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 75.703ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2648 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2648 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id 'bc9f4094-da3f-4b54-a4b5-746a2be25e55' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '61e99f52-a4c3-40bd-92cc-955e50e086d9' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2648) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2648) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 43.28ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 43.28ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 67.828ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 67.828ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/custom/route/todo-items/2649 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/custom/route/todo-items/2649 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'custom/route/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.PatchAsync (JsonApiDotNetCoreExample)' with id '81b735cc-1698-4dd5-a086-6eda734699c0' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.DeleteAsync (JsonApiDotNetCoreExample)' with id '2d84b987-9823-450c-982d-b63abe1024f7' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) with arguments (2649) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) with arguments (2649) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) in 39.12ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) in 39.12ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 60.789ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 60.789ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/testValues -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/testValues -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'TestValues'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TestValuesController.Get (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TestValuesController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TestValuesController.Get (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TestValuesController.Get (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: JsonApiDotNetCore.Serialization.JsonApiSerializer[0] - Response was not a JSONAPI entity. Serializing as plain JSON. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TestValuesController.Get (JsonApiDotNetCoreExample) in 1.407ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 32.217ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TestValuesController.Get (JsonApiDotNetCoreExample) in 1.407ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 32.217ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (6ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (6ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/custom/route/todo-items/2650 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/custom/route/todo-items/2650 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'custom/route/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.PatchAsync (JsonApiDotNetCoreExample)' with id '49ee8a92-89ed-4f38-906c-31ab8083271c' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.DeleteAsync (JsonApiDotNetCoreExample)' with id '744dcbe5-efca-479f-bb8f-d7e1c104d561' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) with arguments (2650) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem e in DbSet - where bool [e].Id.Equals((object)__id_0) - select [e]).SingleOrDefault()' -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) with arguments (2650) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ToSequence(Task SingleOrDefault( - source: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2, - shaper: UnbufferedEntityShaper), - cancellationToken: queryContext.CancellationToken)), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) in 43.411ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) in 43.411ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 65.45ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 65.45ms 200 application/vnd.api+json -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/custom/route/todo-items -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/custom/route/todo-items -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'custom/route/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.PostAsync (JsonApiDotNetCoreExample)' with id '38524268-32e2-49e7-872f-c4f51a0ad8cc' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) in 54.945ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsCustomController.GetAsync (JsonApiDotNetCoreExample) in 54.945ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 69.838ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 69.838ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2651?omitNullValuedAttributes=true -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2651?omitNullValuedAttributes=true -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2651) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2651) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.765ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.765ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.533ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.533ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2652?omitNullValuedAttributes=false -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2652?omitNullValuedAttributes=false -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2652) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2652) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 3.109ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 3.109ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.54ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.54ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2653 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2653 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2653) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2653) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.247ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.247ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.645ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.645ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2654 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2654 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2654) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2654) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 3.771ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 3.771ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 4.491ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 4.491ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2655?omitNullValuedAttributes= -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2655?omitNullValuedAttributes= -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2655) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2655) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.271ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.271ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.444ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.444ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2656?omitNullValuedAttributes=false -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2656?omitNullValuedAttributes=false -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2656) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2656) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 7.526ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 7.526ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 7.947ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 7.947ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2657?omitNullValuedAttributes=true -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2657?omitNullValuedAttributes=true -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2657) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2657) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.605ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.605ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.794ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.794ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2658?omitNullValuedAttributes=true -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2658?omitNullValuedAttributes=true -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2658) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2658) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.479ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.479ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.849ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.849ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2659?omitNullValuedAttributes=foo -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2659?omitNullValuedAttributes=foo -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2659) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2659) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.266ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.266ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.441ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.441ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2660?omitNullValuedAttributes=foo -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2660?omitNullValuedAttributes=foo -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2660) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2660) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.248ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.248ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.239ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.239ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2661?omitNullValuedAttributes=foo -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2661?omitNullValuedAttributes=foo -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2661) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2661) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.492ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.683ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.492ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.683ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2662?omitNullValuedAttributes=false -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2662?omitNullValuedAttributes=false -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2662) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2662) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.181ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.181ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.539ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.539ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2663?omitNullValuedAttributes=true -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2663?omitNullValuedAttributes=true -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2663) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2663) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.411ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.411ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.782ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.782ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (5ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2664?omitNullValuedAttributes=false -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2664?omitNullValuedAttributes=false -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2664) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2664) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.755ms -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.951ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.755ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.951ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2665?omitNullValuedAttributes=foo -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2665?omitNullValuedAttributes=foo -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2665) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2665) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.481ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.481ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.66ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 2.66ms 200 application/vnd.api+json -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2666?omitNullValuedAttributes= -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items/2666?omitNullValuedAttributes= -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items/{id}'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PatchAsync (JsonApiDotNetCoreExample)' with id '1ee61db8-daf4-41f3-90d2-1cf3db87d448' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.DeleteAsync (JsonApiDotNetCoreExample)' with id '75ab2821-99d0-4a3f-9dbb-3747ee7b296e' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2666) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments (2666) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__id_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "e"."Id", "e"."AchievedDate", "e"."AssigneeId", "e"."CollectionId", "e"."CreatedDate", "e"."Description", "e"."GuidProperty", "e"."Ordinal", "e"."OwnerId" - FROM "TodoItems" AS "e" - WHERE "e"."Id" = @__id_0 - LIMIT 2 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.802ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 2.802ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.245ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 3.245ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p2, @p3, @p4, @p5, @p6, @p7, @p8) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p9, @p10, @p11, @p12, @p13, @p14, @p15) - RETURNING "Id", "CreatedDate"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p9, @p10, @p11, @p12, @p13, @p14, @p15) - RETURNING "Id", "CreatedDate"; -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?include=owner -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[todoItem].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -warn: Microsoft.EntityFrameworkCore.Query[10106] - The Include operation for navigation '[todoItem].Owner' is unnecessary and was ignored because the navigation is not reachable in the final query results. See https://go.microsoft.com/fwlink/?linkid=850303 for more information. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@___authService_CurrentUserId_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "todoItem" - WHERE "todoItem"."OwnerId" = @___authService_CurrentUserId_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@___authService_CurrentUserId_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "todoItem" - WHERE "todoItem"."OwnerId" = @___authService_CurrentUserId_0 -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem todoItem in DbSet where [todoItem].OwnerId == (Nullable)___authService...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem todoItem in DbSet where [todoItem].OwnerId == (Nullable)___authService...' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@___authService_CurrentUserId_0='?', @__p_2='?', @__p_1='?'], CommandType='Text', CommandTimeout='30'] - SELECT "todoItem"."Id", "todoItem"."AchievedDate", "todoItem"."AssigneeId", "todoItem"."CollectionId", "todoItem"."CreatedDate", "todoItem"."Description", "todoItem"."GuidProperty", "todoItem"."Ordinal", "todoItem"."OwnerId", "todoItem.Owner"."Id", "todoItem.Owner"."FirstName", "todoItem.Owner"."LastName" - FROM "TodoItems" AS "todoItem" - LEFT JOIN "People" AS "todoItem.Owner" ON "todoItem"."OwnerId" = "todoItem.Owner"."Id" - WHERE "todoItem"."OwnerId" = @___authService_CurrentUserId_0 - LIMIT @__p_2 OFFSET @__p_1 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@___authService_CurrentUserId_0='?', @__p_2='?', @__p_1='?'], CommandType='Text', CommandTimeout='30'] - SELECT "todoItem"."Id", "todoItem"."AchievedDate", "todoItem"."AssigneeId", "todoItem"."CollectionId", "todoItem"."CreatedDate", "todoItem"."Description", "todoItem"."GuidProperty", "todoItem"."Ordinal", "todoItem"."OwnerId", "todoItem.Owner"."Id", "todoItem.Owner"."FirstName", "todoItem.Owner"."LastName" - FROM "TodoItems" AS "todoItem" - LEFT JOIN "People" AS "todoItem.Owner" ON "todoItem"."OwnerId" = "todoItem.Owner"."Id" - WHERE "todoItem"."OwnerId" = @___authService_CurrentUserId_0 - LIMIT @__p_2 OFFSET @__p_1 -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 48.653ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 48.653ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 74.804ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 74.804ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExampleTests -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/people -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/people'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.PeopleController.PostAsync (JsonApiDotNetCoreExample)' with id '1ded46dd-748a-4bb3-b33b-d64481e8f7d0' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "People" AS "p"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "People" AS "p" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 5 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from Person _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from Person _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from Person _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: Person }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "p"."Id", "p"."FirstName", "p"."LastName" - FROM "People" AS "p" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 54.361ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 78.817ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.PeopleController.GetAsync (JsonApiDotNetCoreExample) in 54.361ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 78.817ms 200 application/vnd.api+json -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[5] - Hosting shutdown -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[size]=2 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[size]=2 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '52af8b31-a0b5-47dc-9061-17639045ff8f' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (10ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 0 with 2 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 38.24ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 38.24ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 64.502ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 64.502ms 200 application/vnd.api+json -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[5] - Hosting shutdown -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - 'from TodoItem _0 in DbSet - select [_0]' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - 'from TodoItem _0 in DbSet - select [_0]' -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t", - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; - DELETE FROM "TodoItems" - WHERE "Id" = @p15; - DELETE FROM "TodoItems" - WHERE "Id" = @p16; - DELETE FROM "TodoItems" - WHERE "Id" = @p17; - DELETE FROM "TodoItems" - WHERE "Id" = @p18; - DELETE FROM "TodoItems" - WHERE "Id" = @p19; - DELETE FROM "TodoItems" - WHERE "Id" = @p20; - DELETE FROM "TodoItems" - WHERE "Id" = @p21; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; - DELETE FROM "TodoItems" - WHERE "Id" = @p28; - DELETE FROM "TodoItems" - WHERE "Id" = @p29; - DELETE FROM "TodoItems" - WHERE "Id" = @p30; - DELETE FROM "TodoItems" - WHERE "Id" = @p31; - DELETE FROM "TodoItems" - WHERE "Id" = @p32; - DELETE FROM "TodoItems" - WHERE "Id" = @p33; - DELETE FROM "TodoItems" - WHERE "Id" = @p34; - DELETE FROM "TodoItems" - WHERE "Id" = @p35; - DELETE FROM "TodoItems" - WHERE "Id" = @p36; - DELETE FROM "TodoItems" - WHERE "Id" = @p37; - DELETE FROM "TodoItems" - WHERE "Id" = @p38; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; - DELETE FROM "TodoItems" - WHERE "Id" = @p15; - DELETE FROM "TodoItems" - WHERE "Id" = @p16; - DELETE FROM "TodoItems" - WHERE "Id" = @p17; - DELETE FROM "TodoItems" - WHERE "Id" = @p18; - DELETE FROM "TodoItems" - WHERE "Id" = @p19; - DELETE FROM "TodoItems" - WHERE "Id" = @p20; - DELETE FROM "TodoItems" - WHERE "Id" = @p21; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; - DELETE FROM "TodoItems" - WHERE "Id" = @p28; - DELETE FROM "TodoItems" - WHERE "Id" = @p29; - DELETE FROM "TodoItems" - WHERE "Id" = @p30; - DELETE FROM "TodoItems" - WHERE "Id" = @p31; - DELETE FROM "TodoItems" - WHERE "Id" = @p32; - DELETE FROM "TodoItems" - WHERE "Id" = @p33; - DELETE FROM "TodoItems" - WHERE "Id" = @p34; - DELETE FROM "TodoItems" - WHERE "Id" = @p35; - DELETE FROM "TodoItems" - WHERE "Id" = @p36; - DELETE FROM "TodoItems" - WHERE "Id" = @p37; - DELETE FROM "TodoItems" - WHERE "Id" = @p38; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (4ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?', @p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?', @p38='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; - DELETE FROM "TodoItems" - WHERE "Id" = @p6; - DELETE FROM "TodoItems" - WHERE "Id" = @p7; - DELETE FROM "TodoItems" - WHERE "Id" = @p8; - DELETE FROM "TodoItems" - WHERE "Id" = @p9; - DELETE FROM "TodoItems" - WHERE "Id" = @p10; - DELETE FROM "TodoItems" - WHERE "Id" = @p11; - DELETE FROM "TodoItems" - WHERE "Id" = @p12; - DELETE FROM "TodoItems" - WHERE "Id" = @p13; - DELETE FROM "TodoItems" - WHERE "Id" = @p14; - DELETE FROM "TodoItems" - WHERE "Id" = @p15; - DELETE FROM "TodoItems" - WHERE "Id" = @p16; - DELETE FROM "TodoItems" - WHERE "Id" = @p17; - DELETE FROM "TodoItems" - WHERE "Id" = @p18; - DELETE FROM "TodoItems" - WHERE "Id" = @p19; - DELETE FROM "TodoItems" - WHERE "Id" = @p20; - DELETE FROM "TodoItems" - WHERE "Id" = @p21; - DELETE FROM "TodoItems" - WHERE "Id" = @p22; - DELETE FROM "TodoItems" - WHERE "Id" = @p23; - DELETE FROM "TodoItems" - WHERE "Id" = @p24; - DELETE FROM "TodoItems" - WHERE "Id" = @p25; - DELETE FROM "TodoItems" - WHERE "Id" = @p26; - DELETE FROM "TodoItems" - WHERE "Id" = @p27; - DELETE FROM "TodoItems" - WHERE "Id" = @p28; - DELETE FROM "TodoItems" - WHERE "Id" = @p29; - DELETE FROM "TodoItems" - WHERE "Id" = @p30; - DELETE FROM "TodoItems" - WHERE "Id" = @p31; - DELETE FROM "TodoItems" - WHERE "Id" = @p32; - DELETE FROM "TodoItems" - WHERE "Id" = @p33; - DELETE FROM "TodoItems" - WHERE "Id" = @p34; - DELETE FROM "TodoItems" - WHERE "Id" = @p35; - DELETE FROM "TodoItems" - WHERE "Id" = @p36; - DELETE FROM "TodoItems" - WHERE "Id" = @p37; - DELETE FROM "TodoItems" - WHERE "Id" = @p38; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?', @p67='?', @p68='?', @p69='?', @p70='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p39, @p40, @p41, @p42, @p43, @p44, @p45, @p46) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p47, @p48, @p49, @p50, @p51, @p52, @p53, @p54) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p55, @p56, @p57, @p58, @p59, @p60, @p61, @p62) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p63, @p64, @p65, @p66, @p67, @p68, @p69, @p70) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?', @p67='?', @p68='?', @p69='?', @p70='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p39, @p40, @p41, @p42, @p43, @p44, @p45, @p46) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p47, @p48, @p49, @p50, @p51, @p52, @p53, @p54) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p55, @p56, @p57, @p58, @p59, @p60, @p61, @p62) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p63, @p64, @p65, @p66, @p67, @p68, @p69, @p70) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[@p39='?', @p40='?', @p41='?', @p42='?', @p43='?', @p44='?', @p45='?', @p46='?', @p47='?', @p48='?', @p49='?', @p50='?', @p51='?', @p52='?', @p53='?', @p54='?', @p55='?', @p56='?', @p57='?', @p58='?', @p59='?', @p60='?', @p61='?', @p62='?', @p63='?', @p64='?', @p65='?', @p66='?', @p67='?', @p68='?', @p69='?', @p70='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p39, @p40, @p41, @p42, @p43, @p44, @p45, @p46) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p47, @p48, @p49, @p50, @p51, @p52, @p53, @p54) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p55, @p56, @p57, @p58, @p59, @p60, @p61, @p62) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p63, @p64, @p65, @p66, @p67, @p68, @p69, @p70) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[size]=2&page[number]=1 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[size]=2&page[number]=1 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '8b075eda-2371-4b4f-8774-1f6d937181b9' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page 1 with 2 entities -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 32.06ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 32.06ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 56.326ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 56.326ms 200 application/vnd.api+json -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[5] - Hosting shutdown -dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401] - An 'IServiceProvider' was created for internal use by Entity Framework. -warn: Microsoft.EntityFrameworkCore.Infrastructure[10402] - More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. -info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] - User profile is available. Using '/Users/jarednance/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-b040dd03-33c5-451e-8f42-3c9dd4e0dfec.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-c8147b66-2deb-407c-9421-1553f0e16d67.xml'. -dbug: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[37] - Reading data from file '/Users/jarednance/.aspnet/DataProtection-Keys/key-f7fa4a09-6d65-426e-a653-cbd2969e5073.xml'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {b040dd03-33c5-451e-8f42-3c9dd4e0dfec}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {c8147b66-2deb-407c-9421-1553f0e16d67}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[18] - Found key {f7fa4a09-6d65-426e-a653-cbd2969e5073}. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver[13] - Considering key {c8147b66-2deb-407c-9421-1553f0e16d67} with expiration date 2018-03-03 16:22:35Z as default key. -dbug: Microsoft.AspNetCore.DataProtection.TypeForwardingActivator[0] - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[11] - Using managed symmetric algorithm 'System.Security.Cryptography.Aes'. -dbug: Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory[10] - Using managed keyed hash algorithm 'System.Security.Cryptography.HMACSHA256'. -dbug: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[2] - Using key {c8147b66-2deb-407c-9421-1553f0e16d67} as the default key. -dbug: Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter[0] - Key ring with default key {c8147b66-2deb-407c-9421-1553f0e16d67} was loaded during application startup. -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (7ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - - SELECT CASE WHEN COUNT(*) = 0 THEN FALSE ELSE TRUE END - FROM information_schema.tables - WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3] - Hosting starting -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4] - Hosting started -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[0] - Loaded hosting startup assembly JsonApiDotNetCoreExample -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - 'from TodoItem _0 in DbSet - select [_0]' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - 'from TodoItem _0 in DbSet - select [_0]' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IEnumerable _InterceptExceptions( - source: IEnumerable _TrackEntities( - results: IEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t", - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200] - Beginning transaction with isolation level 'ReadCommitted'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p0='?', @p1='?', @p2='?', @p3='?', @p4='?', @p5='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "People" ("FirstName", "LastName") - VALUES (@p0, @p1) - RETURNING "Id"; - DELETE FROM "TodoItems" - WHERE "Id" = @p2; - DELETE FROM "TodoItems" - WHERE "Id" = @p3; - DELETE FROM "TodoItems" - WHERE "Id" = @p4; - DELETE FROM "TodoItems" - WHERE "Id" = @p5; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p22, @p23, @p24, @p25, @p26, @p27, @p28, @p29) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p30, @p31, @p32, @p33, @p34, @p35, @p36, @p37) - RETURNING "Id"; -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p22, @p23, @p24, @p25, @p26, @p27, @p28, @p29) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p30, @p31, @p32, @p33, @p34, @p35, @p36, @p37) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@p6='?', @p7='?', @p8='?', @p9='?', @p10='?', @p11='?', @p12='?', @p13='?', @p14='?', @p15='?', @p16='?', @p17='?', @p18='?', @p19='?', @p20='?', @p21='?', @p22='?', @p23='?', @p24='?', @p25='?', @p26='?', @p27='?', @p28='?', @p29='?', @p30='?', @p31='?', @p32='?', @p33='?', @p34='?', @p35='?', @p36='?', @p37='?'], CommandType='Text', CommandTimeout='30'] - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p22, @p23, @p24, @p25, @p26, @p27, @p28, @p29) - RETURNING "Id"; - INSERT INTO "TodoItems" ("AchievedDate", "AssigneeId", "CollectionId", "CreatedDate", "Description", "GuidProperty", "Ordinal", "OwnerId") - VALUES (@p30, @p31, @p32, @p33, @p34, @p35, @p36, @p37) - RETURNING "Id"; -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202] - Committing transaction. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204] - Disposing transaction. -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[size]=2&page[number]=-1 -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] - Request starting HTTP/1.1 GET http://localhost/api/v1/todo-items?page[size]=2&page[number]=-1 -dbug: Microsoft.AspNetCore.Routing.Tree.TreeRouter[1] - Request successfully matched the route with name '(null)' and template 'api/v1/todo-items'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[2] - Action 'JsonApiDotNetCoreExample.Controllers.TodoItemsController.PostAsync (JsonApiDotNetCoreExample)' with id '0185f6c8-2dbf-416d-abd0-a7a72d063bea' did not match the constraint 'Microsoft.AspNetCore.Mvc.Internal.HttpMethodActionConstraint' -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] - Executing action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) with arguments ((null)) - ModelState is Valid -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -info: Microsoft.EntityFrameworkCore.Infrastructure[10403] - Entity Framework Core 2.0.1-rtm-125 initialized 'AppDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _1 in DbSet - select [_1]).Count()' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _ToSequence(Task GetResult( - valueBuffers: IAsyncEnumerable _Query( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t"), - throwOnNullResult: False, - cancellationToken: queryContext.CancellationToken)), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (7ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: JsonApiDotNetCore.Services.EntityResourceService[0] - Applying paging query. Fetching page -1 with 2 entities -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (7ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] - SELECT COUNT(*)::INT4 - FROM "TodoItems" AS "t" -dbug: Microsoft.EntityFrameworkCore.Query[10101] - Compiling query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -warn: Microsoft.EntityFrameworkCore.Query[10102] - Query: '(from TodoItem _2 in DbSet select [_2]).Skip(__p_0).Take(__p_1)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. -dbug: Microsoft.EntityFrameworkCore.Query[10104] - Optimized query model: - '(from TodoItem _2 in DbSet - select [_2]) - .Skip(__p_0) - .Take(__p_1)' -dbug: Microsoft.EntityFrameworkCore.Query[10107] - (QueryContext queryContext) => IAsyncEnumerable _InterceptExceptions( - source: IAsyncEnumerable _TrackEntities( - results: IAsyncEnumerable _ShapedQuery( - queryContext: queryContext, - shaperCommandContext: SelectExpression: - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0, - shaper: UnbufferedEntityShaper), - queryContext: queryContext, - entityTrackingInfos: { itemType: TodoItem }, - entityAccessors: List> - { - Func, - } - ), - contextType: JsonApiDotNetCoreExample.Data.AppDbContext, - logger: DiagnosticsLogger, - queryContext: queryContext) -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000] - Opening connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001] - Opened connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Command[20100] - Executing DbCommand [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -info: Microsoft.EntityFrameworkCore.Database.Command[20101] - Executed DbCommand (1ms) [Parameters=[@__p_1='?', @__p_0='?'], CommandType='Text', CommandTimeout='30'] - SELECT "t"."Id", "t"."AchievedDate", "t"."AssigneeId", "t"."CollectionId", "t"."CreatedDate", "t"."Description", "t"."GuidProperty", "t"."Ordinal", "t"."OwnerId" - FROM "TodoItems" AS "t" - LIMIT @__p_1 OFFSET @__p_0 -dbug: Microsoft.EntityFrameworkCore.Database.Command[20300] - A data reader was disposed. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002] - Closing connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003] - Closed connection to database 'JsonApiDotNetCoreExample' on server 'tcp://localhost:5432'. -dbug: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action method JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample), returned result Microsoft.AspNetCore.Mvc.OkObjectResult. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[4] - No information found on request to perform content negotiation. -dbug: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[2] - Selected output formatter 'JsonApiDotNetCore.Formatters.JsonApiOutputFormatter' and content type '' to write the response. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. -info: JsonApiDotNetCore.Formatters.JsonApiWriter[0] - Formatting response as JSONAPI -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 38.909ms -info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] - Executed action JsonApiDotNetCoreExample.Controllers.TodoItemsController.GetAsync (JsonApiDotNetCoreExample) in 38.909ms -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 63.599ms 200 application/vnd.api+json -info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] - Request finished in 63.599ms 200 application/vnd.api+json -dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[5] - Hosting shutdown -[xUnit.net 00:00:22.5994190] Finished: JsonApiDotNetCoreExampleTests - -Total tests: 111. Passed: 110. Failed: 1. Skipped: 0. -Test execution time: 23.7537 Seconds diff --git a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj index c0500c3bbd..6e2fe18abd 100644 --- a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj +++ b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj @@ -20,7 +20,7 @@ - + diff --git a/test/OperationsExampleTests/OperationsExampleTests.csproj b/test/OperationsExampleTests/OperationsExampleTests.csproj index c2c70d6e54..f84b550354 100644 --- a/test/OperationsExampleTests/OperationsExampleTests.csproj +++ b/test/OperationsExampleTests/OperationsExampleTests.csproj @@ -6,7 +6,7 @@ - + diff --git a/test/ResourceEntitySeparationExampleTests/ResourceEntitySeparationExampleTests.csproj b/test/ResourceEntitySeparationExampleTests/ResourceEntitySeparationExampleTests.csproj index e7dbeba06f..cfa496283e 100644 --- a/test/ResourceEntitySeparationExampleTests/ResourceEntitySeparationExampleTests.csproj +++ b/test/ResourceEntitySeparationExampleTests/ResourceEntitySeparationExampleTests.csproj @@ -7,8 +7,6 @@ - - @@ -19,4 +17,13 @@ + + + + + runtime; build; native; contentfiles; analyzers + all + + + diff --git a/test/UnitTests/Builders/DocumentBuilder_Tests.cs b/test/UnitTests/Builders/DocumentBuilder_Tests.cs index 459a8a758d..00b2cad9a0 100644 --- a/test/UnitTests/Builders/DocumentBuilder_Tests.cs +++ b/test/UnitTests/Builders/DocumentBuilder_Tests.cs @@ -300,6 +300,7 @@ public void Build_Will_Use_Resource_If_Defined_For_Multiple_Documents() var scopedServiceProvider = new TestScopedServiceProvider( new ServiceCollection() .AddScoped, UserResource>() + .AddSingleton(resourceGraph) .BuildServiceProvider()); var documentBuilder = new DocumentBuilder(_jsonApiContextMock.Object, scopedServiceProvider: scopedServiceProvider); @@ -323,6 +324,7 @@ public void Build_Will_Use_Resource_If_Defined_For_Single_Document() var scopedServiceProvider = new TestScopedServiceProvider( new ServiceCollection() .AddScoped, UserResource>() + .AddSingleton(resourceGraph) .BuildServiceProvider()); var documentBuilder = new DocumentBuilder(_jsonApiContextMock.Object, scopedServiceProvider: scopedServiceProvider); @@ -345,6 +347,7 @@ public void Build_Will_Use_Instance_Specific_Resource_If_Defined_For_Multiple_Do var scopedServiceProvider = new TestScopedServiceProvider( new ServiceCollection() .AddScoped, InstanceSpecificUserResource>() + .AddSingleton(resourceGraph) .BuildServiceProvider()); var documentBuilder = new DocumentBuilder(_jsonApiContextMock.Object, scopedServiceProvider: scopedServiceProvider); @@ -368,6 +371,7 @@ public void Build_Will_Use_Instance_Specific_Resource_If_Defined_For_Single_Docu var scopedServiceProvider = new TestScopedServiceProvider( new ServiceCollection() .AddScoped, InstanceSpecificUserResource>() + .AddSingleton(resourceGraph) .BuildServiceProvider()); var documentBuilder = new DocumentBuilder(_jsonApiContextMock.Object, scopedServiceProvider: scopedServiceProvider); @@ -386,12 +390,20 @@ public class User : Identifiable public class InstanceSpecificUserResource : ResourceDefinition { + public InstanceSpecificUserResource(IResourceGraph graph) : base(graph) + { + } + protected override List OutputAttrs(User instance) => Remove(user => user.Password); } public class UserResource : ResourceDefinition { + public UserResource(IResourceGraph graph) : base(graph) + { + } + protected override List OutputAttrs() => Remove(user => user.Password); } diff --git a/test/UnitTests/Models/AttributesEqualsTests.cs b/test/UnitTests/Models/AttributesEqualsTests.cs index 0b989169ef..05609bee8a 100644 --- a/test/UnitTests/Models/AttributesEqualsTests.cs +++ b/test/UnitTests/Models/AttributesEqualsTests.cs @@ -1,4 +1,5 @@ -using JsonApiDotNetCore.Models; +using System.Collections.Generic; +using JsonApiDotNetCore.Models; using Xunit; namespace UnitTests.Models diff --git a/test/UnitTests/Models/ResourceDefinitionTests.cs b/test/UnitTests/Models/ResourceDefinitionTests.cs index f058dbc946..5abba48ca8 100644 --- a/test/UnitTests/Models/ResourceDefinitionTests.cs +++ b/test/UnitTests/Models/ResourceDefinitionTests.cs @@ -84,7 +84,7 @@ public void InstanceOutputAttrsAreSpecified_Returns_True_If_Instance_Method_Is_O // assert Assert.True(resource._instanceAttrsAreSpecified); } - + [Fact] public void InstanceOutputAttrsAreSpecified_Returns_False_If_Instance_Method_Is_Not_Overriden() { @@ -109,7 +109,7 @@ public class RequestFilteredResource : ResourceDefinition // this constructor will be resolved from the container // that means you can take on any dependency that is also defined in the container - public RequestFilteredResource(bool isAdmin) + public RequestFilteredResource(bool isAdmin) : base (new ResourceGraphBuilder().AddResource().Build()) { _isAdmin = isAdmin; } @@ -119,24 +119,27 @@ protected override List OutputAttrs() => _isAdmin ? Remove(m => m.AlwaysExcluded) : Remove(m => new { m.AlwaysExcluded, m.Password }, from: base.OutputAttrs()); - + public override QueryFilters GetQueryFilters() => new QueryFilters { { "is-active", (query, value) => query.Select(x => x) } }; - - protected override PropertySortOrder GetDefaultSortOrder() + public override PropertySortOrder GetDefaultSortOrder() => new PropertySortOrder { (t => t.Prop, SortDirection.Ascending) }; } - + public class InstanceFilteredResource : ResourceDefinition { + public InstanceFilteredResource() : base(new ResourceGraphBuilder().AddResource().Build()) + { + } + // Called once per resource instance protected override List OutputAttrs(Model model) => model.AlwaysExcluded == "Admin" ? Remove(m => m.AlwaysExcluded, base.OutputAttrs()) : Remove(m => new { m.AlwaysExcluded, m.Password }, from: base.OutputAttrs()); } -} +} \ No newline at end of file diff --git a/test/UnitTests/ResourceHooks/DiscoveryTests.cs b/test/UnitTests/ResourceHooks/DiscoveryTests.cs new file mode 100644 index 0000000000..6af4f6a392 --- /dev/null +++ b/test/UnitTests/ResourceHooks/DiscoveryTests.cs @@ -0,0 +1,103 @@ +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Hooks; +using System.Collections.Generic; +using Xunit; +using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Internal; + +namespace UnitTests.ResourceHooks +{ + public class DiscoveryTests + { + public class Dummy : Identifiable { } + public class DummyResourceDefinition : ResourceDefinition + { + public DummyResourceDefinition() : base(new ResourceGraphBuilder().AddResource().Build()) { } + + public override IEnumerable BeforeDelete(IAffectedResources affected, ResourcePipeline pipeline) { return affected; } + public override void AfterDelete(HashSet entities, ResourcePipeline pipeline, bool succeeded) { } + } + + [Fact] + public void Hook_Discovery() + { + // arrange & act + var hookConfig = new HooksDiscovery(); + // assert + Assert.Contains(ResourceHook.BeforeDelete, hookConfig.ImplementedHooks); + Assert.Contains(ResourceHook.AfterDelete, hookConfig.ImplementedHooks); + + } + + + public class AnotherDummy : Identifiable { } + public abstract class ResourceDefintionBase : ResourceDefinition where T : class, IIdentifiable + { + protected ResourceDefintionBase(IResourceGraph graph) : base(graph) { } + + public override IEnumerable BeforeDelete(IAffectedResources affected, ResourcePipeline pipeline) { return affected; } + public override void AfterDelete(HashSet entities, ResourcePipeline pipeline, bool succeeded) { } + } + + public class AnotherDummyResourceDefinition : ResourceDefintionBase + { + public AnotherDummyResourceDefinition() : base(new ResourceGraphBuilder().AddResource().Build()) { } + } + [Fact] + public void Hook_Discovery_With_Inheritance() + { + // arrange & act + var hookConfig = new HooksDiscovery(); + // assert + Assert.Contains(ResourceHook.BeforeDelete, hookConfig.ImplementedHooks); + Assert.Contains(ResourceHook.AfterDelete, hookConfig.ImplementedHooks); + } + + + public class YetAnotherDummy : Identifiable { } + public class YetAnotherDummyResourceDefinition : ResourceDefinition + { + public YetAnotherDummyResourceDefinition() : base(new ResourceGraphBuilder().AddResource().Build()) { } + + public override IEnumerable BeforeDelete(IAffectedResources affected, ResourcePipeline pipeline) { return affected; } + + [LoadDatabaseValues(false)] + public override void AfterDelete(HashSet entities, ResourcePipeline pipeline, bool succeeded) { } + } + [Fact] + public void LoadDatabaseValues_Attribute_Not_Allowed() + { + // assert + Assert.Throws(() => + { + // arrange & act + var hookConfig = new HooksDiscovery(); + }); + + } + + public class DoubleDummy : Identifiable { } + public class DoubleDummyResourceDefinition1 : ResourceDefinition + { + public DoubleDummyResourceDefinition1() : base(new ResourceGraphBuilder().AddResource().Build()) { } + + public override IEnumerable BeforeDelete(IAffectedResources affected, ResourcePipeline pipeline) { return affected.Entities; } + } + public class DoubleDummyResourceDefinition2 : ResourceDefinition + { + public DoubleDummyResourceDefinition2() : base(new ResourceGraphBuilder().AddResource().Build()) { } + + public override void AfterDelete(HashSet entities, ResourcePipeline pipeline, bool succeeded) { } + } + [Fact] + public void Multiple_Implementations_Of_ResourceDefinitions() + { + // assert + Assert.Throws(() => + { + // arrange & act + var hookConfig = new HooksDiscovery(); + }); + } + } +} diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/AfterCreateTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/AfterCreateTests.cs new file mode 100644 index 0000000000..ca7b78f86d --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/AfterCreateTests.cs @@ -0,0 +1,86 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class AfterCreateTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.AfterCreate, ResourceHook.AfterUpdateRelationship }; + + [Fact] + public void AfterCreate() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterCreate(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.AfterCreate(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + ownerResourceMock.Verify(rd => rd.AfterUpdateRelationship(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void AfterCreate_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterCreate(todoList, ResourcePipeline.Post); + + // assert + ownerResourceMock.Verify(rd => rd.AfterUpdateRelationship(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void AfterCreate_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterCreate(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.AfterCreate(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void AfterCreate_Without_Any_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterCreate(todoList, ResourcePipeline.Post); + + // assert + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/BeforeCreateTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/BeforeCreateTests.cs new file mode 100644 index 0000000000..4a35411171 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/BeforeCreateTests.cs @@ -0,0 +1,85 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class BeforeCreateTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.BeforeCreate, ResourceHook.BeforeUpdateRelationship }; + + [Fact] + public void BeforeCreate() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + // assert + todoResourceMock.Verify(rd => rd.BeforeCreate(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship(It.IsAny>(), It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeCreate_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + // assert + todoResourceMock.Verify(rd => rd.BeforeCreate(It.IsAny>(), ResourcePipeline.Post), Times.Never()); + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship(It.IsAny>(), It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + [Fact] + public void BeforeCreate_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + // assert + todoResourceMock.Verify(rd => rd.BeforeCreate(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + [Fact] + public void BeforeCreate_Without_Any_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + // assert + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/BeforeCreate_WithDbValues_Tests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/BeforeCreate_WithDbValues_Tests.cs new file mode 100644 index 0000000000..11d1af329a --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Create/BeforeCreate_WithDbValues_Tests.cs @@ -0,0 +1,195 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Data; +using JsonApiDotNetCoreExample.Models; +using Microsoft.EntityFrameworkCore; +using Moq; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class BeforeCreate_WithDbValues_Tests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.BeforeCreate, ResourceHook.BeforeImplicitUpdateRelationship, ResourceHook.BeforeUpdateRelationship }; + private readonly ResourceHook[] targetHooksNoImplicit = { ResourceHook.BeforeCreate, ResourceHook.BeforeUpdateRelationship }; + + private readonly string description = "DESCRIPTION"; + private readonly string lastName = "NAME"; + private readonly string personId; + private readonly List todoList; + private readonly DbContextOptions options; + + public BeforeCreate_WithDbValues_Tests() + { + todoList = CreateTodoWithToOnePerson(); + + todoList[0].Id = 0; + todoList[0].Description = description; + var _personId = todoList[0].ToOnePerson.Id; + personId = _personId.ToString(); + var implicitTodo = _todoFaker.Generate(); + implicitTodo.Id += 1000; + implicitTodo.ToOnePersonId = _personId; + implicitTodo.Description = description + description; + + options = InitInMemoryDb(context => + { + context.Set().Add(new Person { Id = _personId, LastName = lastName }); + context.Set().Add(implicitTodo); + context.SaveChanges(); + }); + } + + [Fact] + public void BeforeCreate() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.BeforeCreate(It.Is>((entities) => TodoCheck(entities, description)), ResourcePipeline.Post), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.IsAny>(), + ResourcePipeline.Post), + Times.Once()); + todoResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship( + It.Is>(rh => TodoCheck(rh, description + description)), + ResourcePipeline.Post), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeCreate_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + + // assert + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.IsAny>(), + ResourcePipeline.Post), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeCreate_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.BeforeCreate(It.Is>((entities) => TodoCheck(entities, description)), ResourcePipeline.Post), Times.Once()); + todoResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship( + It.Is>(rh => TodoCheck(rh, description + description)), + ResourcePipeline.Post), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeCreate_NoImplicit() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdate); + var personDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdateRelationship); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.BeforeCreate(It.Is>((entities) => TodoCheck(entities, description)), ResourcePipeline.Post), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.IsAny>(), + ResourcePipeline.Post), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeCreate_NoImplicit_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdateRelationship); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + + // assert + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.IsAny>(), + ResourcePipeline.Post), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeCreate_NoImplicit_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdate); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeCreate(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.BeforeCreate(It.Is>((entities) => TodoCheck(entities, description)), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + private bool TodoCheck(IEnumerable entities, string checksum) + { + return entities.Single().Description == checksum; + } + + private bool TodoCheck(IAffectedRelationships rh, string checksum) + { + return rh.GetByRelationship().Single().Value.First().Description == checksum; + } + + private bool PersonIdCheck(IEnumerable ids, string checksum) + { + return ids.Single() == checksum; + } + + private bool PersonCheck(string checksum, IAffectedRelationships helper) + { + + var entries = helper.GetByRelationship(); + return entries.Single().Value.Single().LastName == checksum; + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/AfterDeleteTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/AfterDeleteTests.cs new file mode 100644 index 0000000000..051fea3bba --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/AfterDeleteTests.cs @@ -0,0 +1,45 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class AfterDeleteTests : HooksTestsSetup + { + readonly ResourceHook[] targetHooks = { ResourceHook.AfterDelete }; + + [Fact] + public void AfterDelete() + { + // arrange + var discovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var resourceDefinitionMock) = CreateTestObjects(discovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterDelete(todoList, ResourcePipeline.Delete, It.IsAny()); + + // assert + resourceDefinitionMock.Verify(rd => rd.AfterDelete(It.IsAny>(), ResourcePipeline.Delete, It.IsAny()), Times.Once()); + VerifyNoOtherCalls(resourceDefinitionMock); + } + + [Fact] + public void AfterDelete_Without_Any_Hook_Implemented() + { + // arrange + var discovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var resourceDefinitionMock) = CreateTestObjects(discovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterDelete(todoList, ResourcePipeline.Delete, It.IsAny()); + + // assert + VerifyNoOtherCalls(resourceDefinitionMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/BeforeDeleteTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/BeforeDeleteTests.cs new file mode 100644 index 0000000000..763d0716c4 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/BeforeDeleteTests.cs @@ -0,0 +1,45 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class BeforeDeleteTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.BeforeDelete }; + + [Fact] + public void BeforeDelete() + { + // arrange + var discovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var resourceDefinitionMock) = CreateTestObjects(discovery); + + var todoList = CreateTodoWithOwner(); + // act + hookExecutor.BeforeDelete(todoList, ResourcePipeline.Delete); + + // assert + resourceDefinitionMock.Verify(rd => rd.BeforeDelete(It.IsAny>(), It.IsAny()), Times.Once()); + resourceDefinitionMock.VerifyNoOtherCalls(); + } + + [Fact] + public void BeforeDelete_Without_Any_Hook_Implemented() + { + // arrange + var discovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var resourceDefinitionMock) = CreateTestObjects(discovery); + + var todoList = CreateTodoWithOwner(); + // act + hookExecutor.BeforeDelete(todoList, ResourcePipeline.Delete); + + // assert + resourceDefinitionMock.VerifyNoOtherCalls(); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/BeforeDelete_WithDbValue_Tests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/BeforeDelete_WithDbValue_Tests.cs new file mode 100644 index 0000000000..7c23e8d133 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Delete/BeforeDelete_WithDbValue_Tests.cs @@ -0,0 +1,108 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Data; +using JsonApiDotNetCoreExample.Models; +using Microsoft.EntityFrameworkCore; +using Moq; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class BeforeDelete_WithDbValues_Tests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.BeforeDelete, ResourceHook.BeforeImplicitUpdateRelationship, ResourceHook.BeforeUpdateRelationship }; + + private readonly DbContextOptions options; + private readonly Person person; + public BeforeDelete_WithDbValues_Tests() + { + person = _personFaker.Generate(); + var todo1 = _todoFaker.Generate(); + var todo2 = _todoFaker.Generate(); + var passport = _passportFaker.Generate(); + + person.Passport = passport; + person.TodoItems = new List { todo1 }; + person.StakeHolderTodo = todo2; + options = InitInMemoryDb(context => + { + context.Set().Add(person); + context.SaveChanges(); + }); + } + + [Fact] + public void BeforeDelete() + { + // arrange + var personDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var todoDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var passportDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + (var contextMock, var hookExecutor, var personResourceMock, var todoResourceMock, + var passportResourceMock) = CreateTestObjects(personDiscovery, todoDiscovery, passportDiscovery, repoDbContextOptions: options); + + var todoList = CreateTodoWithOwner(); + // act + hookExecutor.BeforeDelete(new List { person }, ResourcePipeline.Delete); + + // assert + personResourceMock.Verify(rd => rd.BeforeDelete(It.IsAny>(), It.IsAny()), Times.Once()); + todoResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship(It.Is>( rh => CheckImplicitTodos(rh) ), ResourcePipeline.Delete), Times.Once()); + passportResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship(It.Is>( rh => CheckImplicitPassports(rh) ), ResourcePipeline.Delete), Times.Once()); + VerifyNoOtherCalls(personResourceMock, todoResourceMock, passportResourceMock); + } + + [Fact] + public void BeforeDelete_No_Parent_Hooks() + { + // arrange + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var todoDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var passportDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + (var contextMock, var hookExecutor, var personResourceMock, var todoResourceMock, + var passportResourceMock) = CreateTestObjects(personDiscovery, todoDiscovery, passportDiscovery, repoDbContextOptions: options); + + var todoList = CreateTodoWithOwner(); + // act + hookExecutor.BeforeDelete(new List { person }, ResourcePipeline.Delete); + + // assert + todoResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship(It.Is>(rh => CheckImplicitTodos(rh)), ResourcePipeline.Delete), Times.Once()); + passportResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship(It.Is>(rh => CheckImplicitPassports(rh)), ResourcePipeline.Delete), Times.Once()); + VerifyNoOtherCalls(personResourceMock, todoResourceMock, passportResourceMock); + } + + [Fact] + public void BeforeDelete_No_Children_Hooks() + { + // arrange + var personDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var passportDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var personResourceMock, var todoResourceMock, + var passportResourceMock) = CreateTestObjects(personDiscovery, todoDiscovery, passportDiscovery, repoDbContextOptions: options); + + var todoList = CreateTodoWithOwner(); + // act + hookExecutor.BeforeDelete(new List { person }, ResourcePipeline.Delete); + + // assert + personResourceMock.Verify(rd => rd.BeforeDelete(It.IsAny>(), It.IsAny()), Times.Once()); + VerifyNoOtherCalls(personResourceMock, todoResourceMock, passportResourceMock); + } + + private bool CheckImplicitTodos(IAffectedRelationships rh) + { + var todos = rh.GetByRelationship().ToList(); + return todos.Count == 2; + } + + private bool CheckImplicitPassports(IAffectedRelationships rh) + { + var passports = rh.GetByRelationship().Single().Value; + return passports.Count == 1; + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/IdentifiableManyToMany_OnReturnTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/IdentifiableManyToMany_OnReturnTests.cs new file mode 100644 index 0000000000..fd29857c37 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/IdentifiableManyToMany_OnReturnTests.cs @@ -0,0 +1,154 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class IdentifiableManyToMany_OnReturnTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.OnReturn }; + + [Fact] + public void OnReturn() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Get), Times.Once()); + joinResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(joins).Any()), ResourcePipeline.Get), Times.Once()); + tagResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_GetRelationship() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.GetRelationship); + + // assert + joinResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(joins).Any()), ResourcePipeline.GetRelationship), Times.Once()); + tagResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.GetRelationship), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Parent_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + joinResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(joins).Any()), ResourcePipeline.Get), Times.Once()); + tagResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Children_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Get), Times.Once()); + tagResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Grand_Children_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Get), Times.Once()); + joinResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(joins).Any()), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Any_Descendant_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Any_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // asert + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/ManyToMany_OnReturnTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/ManyToMany_OnReturnTests.cs new file mode 100644 index 0000000000..ad9577c3b5 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/ManyToMany_OnReturnTests.cs @@ -0,0 +1,118 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class ManyToMany_OnReturnTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.OnReturn }; + + (List
, List, List) CreateDummyData() + { + var tagsSubset = _tagFaker.Generate(3).ToList(); + var joinsSubSet = _articleTagFaker.Generate(3).ToList(); + var articleTagsSubset = _articleFaker.Generate(); + articleTagsSubset.ArticleTags = joinsSubSet; + for (int i = 0; i < 3; i++) + { + joinsSubSet[i].Article = articleTagsSubset; + joinsSubSet[i].Tag = tagsSubset[i]; + } + + var allTags = _tagFaker.Generate(3).ToList().Concat(tagsSubset).ToList(); + var completeJoin = _articleTagFaker.Generate(6).ToList(); + + var articleWithAllTags = _articleFaker.Generate(); + articleWithAllTags.ArticleTags = completeJoin; + + for (int i = 0; i < 6; i++) + { + completeJoin[i].Article = articleWithAllTags; + completeJoin[i].Tag = allTags[i]; + } + + var allJoins = joinsSubSet.Concat(completeJoin).ToList(); + + var articles = new List
() { articleTagsSubset, articleWithAllTags }; + return (articles, allJoins, allTags); + } + + [Fact] + public void OnReturn() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateDummyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Get), Times.Once()); + tagResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Parent_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateDummyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // asser + tagResourceMock.Verify(rd => rd.OnReturn(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Children_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateDummyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Get), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + + [Fact] + public void OnReturn_Without_Any_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + + (var articles, var joins, var tags) = CreateDummyData(); + + // act + hookExecutor.OnReturn(articles, ResourcePipeline.Get); + + // assert + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/BeforeReadTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/BeforeReadTests.cs new file mode 100644 index 0000000000..e0eceb2fd5 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/BeforeReadTests.cs @@ -0,0 +1,170 @@ +using System.Collections.Generic; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class BeforeReadTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.BeforeRead }; + + [Fact] + public void BeforeRead() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock) = CreateTestObjects(todoDiscovery); + var todoList = CreateTodoWithOwner(); + + contextMock.Setup(c => c.IncludedRelationships).Returns(new List()); + // act + hookExecutor.BeforeRead(ResourcePipeline.Get); + // assert + todoResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, false, null), Times.Once()); + VerifyNoOtherCalls(todoResourceMock); + + } + + [Fact] + public void BeforeReadWithInclusion() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // eg a call on api/todo-items?include=owner,assignee,stake-holders + contextMock.Setup(c => c.IncludedRelationships).Returns(new List() { "owner", "assignee", "stake-holders" }); + + // act + hookExecutor.BeforeRead(ResourcePipeline.Get); + // assert + todoResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, false, null), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, true, null), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeReadWithNestedInclusion() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var passportDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock, var passportResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, passportDiscovery); + var todoList = CreateTodoWithOwner(); + + // eg a call on api/todo-items?include=owner.passport,assignee,stake-holders + contextMock.Setup(c => c.IncludedRelationships).Returns(new List() { "owner.passport", "assignee", "stake-holders" }); + + // act + hookExecutor.BeforeRead(ResourcePipeline.Get); + // assert + todoResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, false, null), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, true, null), Times.Once()); + passportResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, true, null), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock, passportResourceMock); + } + + + [Fact] + public void BeforeReadWithNestedInclusion_No_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var passportDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock, var passportResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, passportDiscovery); + var todoList = CreateTodoWithOwner(); + + // eg a call on api/todo-items?include=owner.passport,assignee,stake-holders + contextMock.Setup(c => c.IncludedRelationships).Returns(new List() { "owner.passport", "assignee", "stake-holders" }); + + // act + hookExecutor.BeforeRead(ResourcePipeline.Get); + // assert + ownerResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, true, null), Times.Once()); + passportResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, true, null), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock, passportResourceMock); + } + + [Fact] + public void BeforeReadWithNestedInclusion_No_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var passportDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock, var passportResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, passportDiscovery); + var todoList = CreateTodoWithOwner(); + + // eg a call on api/todo-items?include=owner.passport,assignee,stake-holders + contextMock.Setup(c => c.IncludedRelationships).Returns(new List() { "owner.passport", "assignee", "stake-holders" }); + + // act + hookExecutor.BeforeRead(ResourcePipeline.Get); + // assert + todoResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, false, null), Times.Once()); + passportResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, true, null), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock, passportResourceMock); + } + + [Fact] + public void BeforeReadWithNestedInclusion_No_Grandchild_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var passportDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock, var passportResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, passportDiscovery); + var todoList = CreateTodoWithOwner(); + + // eg a call on api/todo-items?include=owner.passport,assignee,stake-holders + contextMock.Setup(c => c.IncludedRelationships).Returns(new List() { "owner.passport", "assignee", "stake-holders" }); + + // act + hookExecutor.BeforeRead(ResourcePipeline.Get); + // assert + todoResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, false, null), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeRead(ResourcePipeline.Get, true, null), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock, passportResourceMock); + } + + + [Fact] + public void BeforeReadWithNestedInclusion_Without_Any_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var passportDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock, var passportResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, passportDiscovery); + var todoList = CreateTodoWithOwner(); + + // eg a call on api/todo-items?include=owner.passport,assignee,stake-holders + contextMock.Setup(c => c.IncludedRelationships).Returns(new List() { "owner.passport", "assignee", "stake-holders" }); + + // act + hookExecutor.BeforeRead(ResourcePipeline.Get); + // assert + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock, passportResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/IdentifiableManyToMany_AfterReadTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/IdentifiableManyToMany_AfterReadTests.cs new file mode 100644 index 0000000000..1d34524029 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/IdentifiableManyToMany_AfterReadTests.cs @@ -0,0 +1,135 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class IdentifiableManyToMany_AfterReadTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.AfterRead }; + + [Fact] + public void AfterRead() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.AfterRead(It.IsAny>(), ResourcePipeline.Get, false), Times.Once()); + joinResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(joins).Any()), ResourcePipeline.Get, true), Times.Once()); + tagResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get, true), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Parent_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + joinResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(joins).Any()), ResourcePipeline.Get, true), Times.Once()); + tagResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get, true), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Children_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.AfterRead(It.IsAny>(), ResourcePipeline.Get, false), Times.Once()); + tagResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get, true), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Grand_Children_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.AfterRead(It.IsAny>(), ResourcePipeline.Get, false), Times.Once()); + joinResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(joins).Any()), ResourcePipeline.Get, true), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Any_Descendant_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.AfterRead(It.IsAny>(), ResourcePipeline.Get, false), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Any_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var joinDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var joinResourceMock, var tagResourceMock) = CreateTestObjects(articleDiscovery, joinDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateIdentifiableManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // asert + VerifyNoOtherCalls(articleResourceMock, joinResourceMock, tagResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/ManyToMany_AfterReadTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/ManyToMany_AfterReadTests.cs new file mode 100644 index 0000000000..dcdf81ef94 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Read/ManyToMany_AfterReadTests.cs @@ -0,0 +1,87 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class ManyToMany_AfterReadTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.AfterRead }; + + [Fact] + public void AfterRead() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.AfterRead(It.IsAny>(), ResourcePipeline.Get, false), Times.Once()); + tagResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get, true), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Parent_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + tagResourceMock.Verify(rd => rd.AfterRead(It.Is>((collection) => !collection.Except(tags).Any()), ResourcePipeline.Get, true), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Children_Hooks_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(targetHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + articleResourceMock.Verify(rd => rd.AfterRead(It.IsAny>(), ResourcePipeline.Get, false), Times.Once()); + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + + [Fact] + public void AfterRead_Without_Any_Hook_Implemented() + { + // arrange + var articleDiscovery = SetDiscoverableHooks
(NoHooks, DisableDbValues); + var tagDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var articleResourceMock, + var tagResourceMock) = CreateTestObjects(articleDiscovery, tagDiscovery); + (var articles, var joins, var tags) = CreateManyToManyData(); + + // act + hookExecutor.AfterRead(articles, ResourcePipeline.Get); + + // assert + VerifyNoOtherCalls(articleResourceMock, tagResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/ScenarioTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/ScenarioTests.cs new file mode 100644 index 0000000000..c79f633c83 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/ScenarioTests.cs @@ -0,0 +1,82 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class SameEntityTypeTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.OnReturn }; + + [Fact] + public void Entity_Has_Multiple_Relations_To_Same_Type() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var person1 = new Person(); + var todo = new TodoItem { Owner = person1 }; + var person2 = new Person { AssignedTodoItems = new List() { todo } }; + todo.Assignee = person2; + var person3 = new Person { StakeHolderTodo = todo }; + todo.StakeHolders = new List { person3 }; + var todoList = new List() { todo }; + + // act + hookExecutor.OnReturn(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + ownerResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void Entity_Has_Cyclic_Relations() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock) = CreateTestObjects(todoDiscovery); + var todo = new TodoItem(); + todo.ParentTodoItem = todo; + todo.ChildrenTodoItems = new List { todo }; + var todoList = new List() { todo }; + + // act + hookExecutor.OnReturn(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Post), Times.Once()); + VerifyNoOtherCalls(todoResourceMock); + } + + [Fact] + public void Entity_Has_Nested_Cyclic_Relations() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock) = CreateTestObjects(todoDiscovery); + var rootTodo = new TodoItem() { Id = 1 }; + var child = new TodoItem { ParentTodoItem = rootTodo, Id = 2 }; + rootTodo.ChildrenTodoItems = new List { child }; + var grandChild = new TodoItem() { ParentTodoItem = child, Id = 3 }; + child.ChildrenTodoItems = new List { grandChild }; + var greatGrandChild = new TodoItem() { ParentTodoItem = grandChild, Id = 4 }; + grandChild.ChildrenTodoItems = new List { greatGrandChild }; + greatGrandChild.ChildrenTodoItems = new List { rootTodo }; + var todoList = new List() { rootTodo }; + + // act + hookExecutor.OnReturn(todoList, ResourcePipeline.Post); + + // assert + todoResourceMock.Verify(rd => rd.OnReturn(It.IsAny>(), ResourcePipeline.Post), Times.Exactly(4)); + VerifyNoOtherCalls(todoResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/AfterUpdateTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/AfterUpdateTests.cs new file mode 100644 index 0000000000..e9c7f98473 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/AfterUpdateTests.cs @@ -0,0 +1,86 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class AfterUpdateTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.AfterUpdate, ResourceHook.AfterUpdateRelationship }; + + [Fact] + public void AfterUpdate() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.AfterUpdate(It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + ownerResourceMock.Verify(rd => rd.AfterUpdateRelationship(It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void AfterUpdate_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterUpdate(todoList, ResourcePipeline.Patch); + + // assert + ownerResourceMock.Verify(rd => rd.AfterUpdateRelationship(It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void AfterUpdate_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.AfterUpdate(It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void AfterUpdate_Without_Any_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.AfterUpdate(todoList, ResourcePipeline.Patch); + + // assert + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/BeforeUpdateTests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/BeforeUpdateTests.cs new file mode 100644 index 0000000000..67195f2d95 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/BeforeUpdateTests.cs @@ -0,0 +1,87 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Models; +using Moq; +using System.Collections.Generic; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class BeforeUpdateTests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.BeforeUpdate, ResourceHook.BeforeUpdateRelationship }; + + [Fact] + public void BeforeUpdate() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.BeforeUpdate(It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship(It.IsAny>(), It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeUpdate_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship(It.IsAny>(), It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeUpdate_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.BeforeUpdate(It.IsAny>(), ResourcePipeline.Patch), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeUpdate_Without_Any_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery); + var todoList = CreateTodoWithOwner(); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/BeforeUpdate_WithDbValues_Tests.cs b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/BeforeUpdate_WithDbValues_Tests.cs new file mode 100644 index 0000000000..42b7151a07 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHookExecutor/Update/BeforeUpdate_WithDbValues_Tests.cs @@ -0,0 +1,236 @@ +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCoreExample.Data; +using JsonApiDotNetCoreExample.Models; +using Microsoft.EntityFrameworkCore; +using Moq; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace UnitTests.ResourceHooks +{ + public class BeforeUpdate_WithDbValues_Tests : HooksTestsSetup + { + private readonly ResourceHook[] targetHooks = { ResourceHook.BeforeUpdate, ResourceHook.BeforeImplicitUpdateRelationship, ResourceHook.BeforeUpdateRelationship }; + private readonly ResourceHook[] targetHooksNoImplicit = { ResourceHook.BeforeUpdate, ResourceHook.BeforeUpdateRelationship }; + + private readonly string description = "DESCRIPTION"; + private readonly string lastName = "NAME"; + private readonly string personId; + private readonly List todoList; + private readonly DbContextOptions options; + + public BeforeUpdate_WithDbValues_Tests() + { + todoList = CreateTodoWithToOnePerson(); + + var todoId = todoList[0].Id; + var _personId = todoList[0].ToOnePerson.Id; + personId = _personId.ToString(); + var _implicitPersonId = (_personId + 10000); + + var implicitTodo = _todoFaker.Generate(); + implicitTodo.Id += 1000; + implicitTodo.ToOnePersonId = _personId; + implicitTodo.Description = description + description; + + options = InitInMemoryDb(context => + { + context.Set().Add(new Person { Id = _personId, LastName = lastName }); + context.Set().Add(new Person { Id = _implicitPersonId, LastName = lastName + lastName }); + context.Set().Add(new TodoItem { Id = todoId, ToOnePersonId = _implicitPersonId, Description = description }); + context.Set().Add(implicitTodo); + context.SaveChanges(); + }); + } + + [Fact] + public void BeforeUpdate() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.BeforeUpdate(It.Is>((diff) => TodoCheck(diff, description)), ResourcePipeline.Patch), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.Is>(rh => PersonCheck(lastName, rh)), + ResourcePipeline.Patch), + Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship( + It.Is>(rh => PersonCheck(lastName + lastName, rh)), + ResourcePipeline.Patch), + Times.Once()); + todoResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship( + It.Is>( rh => TodoCheck(rh, description + description)), + ResourcePipeline.Patch), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + + [Fact] + public void BeforeUpdate_Deleting_Relationship() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + var attr = ResourceGraph.Instance.GetContextEntity(typeof(TodoItem)).Relationships.Single(r => r.PublicRelationshipName == "one-to-one-person"); + contextMock.Setup(c => c.RelationshipsToUpdate).Returns(new Dictionary() { { attr, new object() } }); + + // act + var _todoList = new List() { new TodoItem { Id = this.todoList[0].Id } }; + hookExecutor.BeforeUpdate(_todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.BeforeUpdate(It.Is>((diff) => TodoCheck(diff, description)), ResourcePipeline.Patch), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship( + It.Is>(rh => PersonCheck(lastName + lastName, rh)), + ResourcePipeline.Patch), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + + [Fact] + public void BeforeUpdate_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.Is>(rh => PersonCheck(lastName, rh)), + ResourcePipeline.Patch), + Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship( + It.Is>(rh => PersonCheck(lastName + lastName, rh)), + ResourcePipeline.Patch), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeUpdate_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooks, EnableDbValues); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.BeforeUpdate(It.Is>((diff) => TodoCheck(diff, description)), ResourcePipeline.Patch), Times.Once()); + todoResourceMock.Verify(rd => rd.BeforeImplicitUpdateRelationship( + It.Is>(rh => TodoCheck(rh, description + description)), + ResourcePipeline.Patch), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeUpdate_NoImplicit() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdate ); + var personDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdateRelationship ); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.BeforeUpdate(It.Is>((diff) => TodoCheck(diff, description)), ResourcePipeline.Patch), Times.Once()); + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.IsAny>(), + ResourcePipeline.Patch), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeUpdate_NoImplicit_Without_Parent_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + var personDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdateRelationship ); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + ownerResourceMock.Verify(rd => rd.BeforeUpdateRelationship( + It.Is>(ids => PersonIdCheck(ids, personId)), + It.Is>(rh => PersonCheck(lastName, rh)), + ResourcePipeline.Patch), + Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + [Fact] + public void BeforeUpdate_NoImplicit_Without_Child_Hook_Implemented() + { + // arrange + var todoDiscovery = SetDiscoverableHooks(targetHooksNoImplicit, ResourceHook.BeforeUpdate); + var personDiscovery = SetDiscoverableHooks(NoHooks, DisableDbValues); + (var contextMock, var hookExecutor, var todoResourceMock, + var ownerResourceMock) = CreateTestObjects(todoDiscovery, personDiscovery, repoDbContextOptions: options); + + // act + hookExecutor.BeforeUpdate(todoList, ResourcePipeline.Patch); + + // assert + todoResourceMock.Verify(rd => rd.BeforeUpdate(It.Is>((diff) => TodoCheck(diff, description)), ResourcePipeline.Patch), Times.Once()); + VerifyNoOtherCalls(todoResourceMock, ownerResourceMock); + } + + private bool TodoCheck(IAffectedResourcesDiff diff, string checksum) + { + var diffPair = diff.GetDiff().Single(); + var dbCheck = diffPair.DatabaseValue.Description == checksum; + var reqCheck = diffPair.Entity.Description == null; + return (dbCheck && reqCheck); + } + + private bool TodoCheck(IAffectedRelationships rh, string checksum) + { + return rh.GetByRelationship().Single().Value.First().Description == checksum; + } + + private bool PersonIdCheck(IEnumerable ids, string checksum) + { + return ids.Single() == checksum; + } + + private bool PersonCheck(string checksum, IAffectedRelationships helper) + { + var entries = helper.GetByRelationship(); + return entries.Single().Value.Single().LastName == checksum; + } + } +} + diff --git a/test/UnitTests/ResourceHooks/ResourceHooksTestsSetup.cs b/test/UnitTests/ResourceHooks/ResourceHooksTestsSetup.cs new file mode 100644 index 0000000000..271e1baf09 --- /dev/null +++ b/test/UnitTests/ResourceHooks/ResourceHooksTestsSetup.cs @@ -0,0 +1,366 @@ +using Bogus; +using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Configuration; +using JsonApiDotNetCore.Data; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Internal.Generics; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Services; +using JsonApiDotNetCore.Hooks; +using JsonApiDotNetCoreExample.Data; +using JsonApiDotNetCoreExample.Models; +using Microsoft.EntityFrameworkCore; +using Moq; +using System; +using System.Collections.Generic; +using System.Linq; +using Person = JsonApiDotNetCoreExample.Models.Person; + +namespace UnitTests.ResourceHooks +{ + public class HooksDummyData + { + protected ResourceHook[] NoHooks = new ResourceHook[0]; + protected ResourceHook[] EnableDbValues = { ResourceHook.BeforeUpdate, ResourceHook.BeforeUpdateRelationship }; + protected ResourceHook[] DisableDbValues = new ResourceHook[0]; + protected readonly Faker _personFaker; + protected readonly Faker _todoFaker; + protected readonly Faker _tagFaker; + protected readonly Faker
_articleFaker; + protected readonly Faker _articleTagFaker; + protected readonly Faker _identifiableArticleTagFaker; + protected readonly Faker _passportFaker; + public HooksDummyData() + { + new ResourceGraphBuilder() + .AddResource() + .AddResource() + .AddResource() + .AddResource
() + .AddResource() + .AddResource() + .Build(); + + _todoFaker = new Faker().Rules((f, i) => i.Id = f.UniqueIndex + 1); + _personFaker = new Faker().Rules((f, i) => i.Id = f.UniqueIndex + 1); + + _articleFaker = new Faker
().Rules((f, i) => i.Id = f.UniqueIndex + 1); + _articleTagFaker = new Faker(); + _identifiableArticleTagFaker = new Faker().Rules((f, i) => i.Id = f.UniqueIndex + 1); + _tagFaker = new Faker().Rules((f, i) => i.Id = f.UniqueIndex + 1); + + _passportFaker = new Faker().Rules((f, i) => i.Id = f.UniqueIndex + 1); + } + + protected List CreateTodoWithToOnePerson() + { + var todoItem = _todoFaker.Generate(); + var person = _personFaker.Generate(); + var todoList = new List() { todoItem }; + person.ToOneTodoItem = todoItem; + todoItem.ToOnePerson = person; + return todoList; + } + + protected List CreateTodoWithOwner() + { + var todoItem = _todoFaker.Generate(); + var person = _personFaker.Generate(); + var todoList = new List() { todoItem }; + person.AssignedTodoItems = todoList; + todoItem.Owner = person; + return todoList; + } + + protected (List
, List, List) CreateManyToManyData() + { + var tagsSubset = _tagFaker.Generate(3).ToList(); + var joinsSubSet = _articleTagFaker.Generate(3).ToList(); + var articleTagsSubset = _articleFaker.Generate(); + articleTagsSubset.ArticleTags = joinsSubSet; + for (int i = 0; i < 3; i++) + { + joinsSubSet[i].Article = articleTagsSubset; + joinsSubSet[i].Tag = tagsSubset[i]; + } + + var allTags = _tagFaker.Generate(3).ToList().Concat(tagsSubset).ToList(); + var completeJoin = _articleTagFaker.Generate(6).ToList(); + + var articleWithAllTags = _articleFaker.Generate(); + articleWithAllTags.ArticleTags = completeJoin; + + for (int i = 0; i < 6; i++) + { + completeJoin[i].Article = articleWithAllTags; + completeJoin[i].Tag = allTags[i]; + } + + var allJoins = joinsSubSet.Concat(completeJoin).ToList(); + + var articles = new List
() { articleTagsSubset, articleWithAllTags }; + return (articles, allJoins, allTags); + } + + protected (List
, List, List) CreateIdentifiableManyToManyData() + { + var tagsSubset = _tagFaker.Generate(3).ToList(); + var joinsSubSet = _identifiableArticleTagFaker.Generate(3).ToList(); + var articleTagsSubset = _articleFaker.Generate(); + articleTagsSubset.IdentifiableArticleTags = joinsSubSet; + for (int i = 0; i < 3; i++) + { + joinsSubSet[i].Article = articleTagsSubset; + joinsSubSet[i].Tag = tagsSubset[i]; + } + var allTags = _tagFaker.Generate(3).ToList().Concat(tagsSubset).ToList(); + var completeJoin = _identifiableArticleTagFaker.Generate(6).ToList(); + + var articleWithAllTags = _articleFaker.Generate(); + articleWithAllTags.IdentifiableArticleTags = joinsSubSet; + + for (int i = 0; i < 6; i++) + { + completeJoin[i].Article = articleWithAllTags; + completeJoin[i].Tag = allTags[i]; + } + + var allJoins = joinsSubSet.Concat(completeJoin).ToList(); + var articles = new List
() { articleTagsSubset, articleWithAllTags }; + return (articles, allJoins, allTags); + } + + } + + public class HooksTestsSetup : HooksDummyData + { + protected (Mock, IResourceHookExecutor, Mock>) + CreateTestObjects(IHooksDiscovery discovery = null) + where TMain : class, IIdentifiable + { + // creates the resource definition mock and corresponding ImplementedHooks discovery instance + var mainResource = CreateResourceDefinition(discovery); + + // mocking the GenericProcessorFactory and JsonApiContext and wiring them up. + (var context, var processorFactory) = CreateContextAndProcessorMocks(); + + // wiring up the mocked GenericProcessorFactory to return the correct resource definition + SetupProcessorFactoryForResourceDefinition(processorFactory, mainResource.Object, discovery, context.Object); + var meta = new HookExecutorHelper(context.Object.GenericProcessorFactory, ResourceGraph.Instance, context.Object); + var hookExecutor = new ResourceHookExecutor(meta, context.Object, ResourceGraph.Instance); + + return (context, hookExecutor, mainResource); + } + + protected (Mock context, IResourceHookExecutor, Mock>, Mock>) + CreateTestObjects( + IHooksDiscovery mainDiscovery = null, + IHooksDiscovery nestedDiscovery = null, + DbContextOptions repoDbContextOptions = null + ) + where TMain : class, IIdentifiable + where TNested : class, IIdentifiable + { + // creates the resource definition mock and corresponding for a given set of discoverable hooks + var mainResource = CreateResourceDefinition(mainDiscovery); + var nestedResource = CreateResourceDefinition(nestedDiscovery); + + // mocking the GenericProcessorFactory and JsonApiContext and wiring them up. + (var context, var processorFactory) = CreateContextAndProcessorMocks(); + + + var dbContext = repoDbContextOptions != null ? new AppDbContext(repoDbContextOptions) : null; + + SetupProcessorFactoryForResourceDefinition(processorFactory, mainResource.Object, mainDiscovery, context.Object, dbContext); + var meta = new HookExecutorHelper(context.Object.GenericProcessorFactory, ResourceGraph.Instance, context.Object); + var hookExecutor = new ResourceHookExecutor(meta, context.Object, ResourceGraph.Instance); + + SetupProcessorFactoryForResourceDefinition(processorFactory, nestedResource.Object, nestedDiscovery, context.Object, dbContext); + + return (context, hookExecutor, mainResource, nestedResource); + } + + protected (Mock context, IResourceHookExecutor, Mock>, Mock>, Mock>) + CreateTestObjects( + IHooksDiscovery mainDiscovery = null, + IHooksDiscovery firstNestedDiscovery = null, + IHooksDiscovery secondNestedDiscovery = null, + DbContextOptions repoDbContextOptions = null + ) + where TMain : class, IIdentifiable + where TFirstNested : class, IIdentifiable + where TSecondNested : class, IIdentifiable + { + // creates the resource definition mock and corresponding for a given set of discoverable hooks + var mainResource = CreateResourceDefinition(mainDiscovery); + var firstNestedResource = CreateResourceDefinition(firstNestedDiscovery); + var secondNestedResource = CreateResourceDefinition(secondNestedDiscovery); + + // mocking the GenericProcessorFactory and JsonApiContext and wiring them up. + (var context, var processorFactory) = CreateContextAndProcessorMocks(); + + var dbContext = repoDbContextOptions != null ? new AppDbContext(repoDbContextOptions) : null; + + SetupProcessorFactoryForResourceDefinition(processorFactory, mainResource.Object, mainDiscovery, context.Object, dbContext); + var meta = new HookExecutorHelper(context.Object.GenericProcessorFactory, ResourceGraph.Instance, context.Object); + var hookExecutor = new ResourceHookExecutor(meta, context.Object, ResourceGraph.Instance); + + SetupProcessorFactoryForResourceDefinition(processorFactory, firstNestedResource.Object, firstNestedDiscovery, context.Object, dbContext); + SetupProcessorFactoryForResourceDefinition(processorFactory, secondNestedResource.Object, secondNestedDiscovery, context.Object, dbContext); + + return (context, hookExecutor, mainResource, firstNestedResource, secondNestedResource); + } + + protected IHooksDiscovery SetDiscoverableHooks(ResourceHook[] implementedHooks, params ResourceHook[] enableDbValuesHooks) + where TEntity : class, IIdentifiable + { + var mock = new Mock>(); + mock.Setup(discovery => discovery.ImplementedHooks) + .Returns(implementedHooks); + + if (!enableDbValuesHooks.Any()) + { + mock.Setup(discovery => discovery.DatabaseValuesDisabledHooks) + .Returns(enableDbValuesHooks); + } + mock.Setup(discovery => discovery.DatabaseValuesEnabledHooks) + .Returns(new ResourceHook[] { ResourceHook.BeforeImplicitUpdateRelationship }.Concat(enableDbValuesHooks).ToArray()); + + return mock.Object; + } + + protected void VerifyNoOtherCalls(params dynamic[] resourceMocks) + { + foreach (var mock in resourceMocks) + { + mock.VerifyNoOtherCalls(); + } + } + + protected DbContextOptions InitInMemoryDb(Action seeder) + { + var options = new DbContextOptionsBuilder() + .UseInMemoryDatabase(databaseName: "repository_mock") + .Options; + + using (var context = new AppDbContext(options)) + { + seeder(context); + ResolveInverseRelationships(context); + } + return options; + } + + void MockHooks(Mock> resourceDefinition) where TModel : class, IIdentifiable + { + resourceDefinition + .Setup(rd => rd.BeforeCreate(It.IsAny>(), It.IsAny())) + .Returns, ResourcePipeline>((entities, context) => entities) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.BeforeRead(It.IsAny(), It.IsAny(), It.IsAny())) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.BeforeUpdate(It.IsAny>(), It.IsAny())) + .Returns, ResourcePipeline>((entityDiff, context) => entityDiff.Entities) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.BeforeDelete(It.IsAny>(), It.IsAny())) + .Returns, ResourcePipeline>((entities, context) => entities) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.BeforeUpdateRelationship(It.IsAny>(), It.IsAny>(), It.IsAny())) + .Returns, IAffectedRelationships, ResourcePipeline>((ids, context, helper) => ids) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.BeforeImplicitUpdateRelationship(It.IsAny>(), It.IsAny())) + .Verifiable(); + + resourceDefinition + .Setup(rd => rd.OnReturn(It.IsAny>(), It.IsAny())) + .Returns, ResourcePipeline>((entities, context) => entities) + .Verifiable(); + + resourceDefinition + .Setup(rd => rd.AfterCreate(It.IsAny>(), It.IsAny())) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.AfterRead(It.IsAny>(), It.IsAny(), It.IsAny())) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.AfterUpdate(It.IsAny>(), It.IsAny())) + .Verifiable(); + resourceDefinition + .Setup(rd => rd.AfterDelete(It.IsAny>(), It.IsAny(), It.IsAny())) + .Verifiable(); + + + } + + (Mock, Mock) CreateContextAndProcessorMocks() + { + var processorFactory = new Mock(); + var context = new Mock(); + context.Setup(c => c.GenericProcessorFactory).Returns(processorFactory.Object); + context.Setup(c => c.Options).Returns(new JsonApiOptions { LoadDatabaseValues = false }); + context.Setup(c => c.ResourceGraph).Returns(ResourceGraph.Instance); + + return (context, processorFactory); + } + + void SetupProcessorFactoryForResourceDefinition( + Mock processorFactory, + IResourceHookContainer modelResource, + IHooksDiscovery discovery, + IJsonApiContext apiContext, + AppDbContext dbContext = null + ) + where TModel : class, IIdentifiable + { + processorFactory.Setup(c => c.GetProcessor(typeof(ResourceDefinition<>), typeof(TModel))) + .Returns(modelResource); + + processorFactory.Setup(c => c.GetProcessor(typeof(IHooksDiscovery<>), typeof(TModel))) + .Returns(discovery); + + if (dbContext != null) + { + IEntityReadRepository repo = CreateTestRepository(dbContext, apiContext); + processorFactory.Setup(c => c.GetProcessor>(typeof(IEntityReadRepository<,>), typeof(TModel), typeof(int))).Returns(repo); + } + } + + IEntityReadRepository CreateTestRepository( + AppDbContext dbContext, + IJsonApiContext apiContext + ) where TModel : class, IIdentifiable + { + IDbContextResolver resolver = CreateTestDbResolver(dbContext); + return new DefaultEntityRepository(apiContext, resolver); + } + + IDbContextResolver CreateTestDbResolver(AppDbContext dbContext) where TModel : class, IIdentifiable + { + var mock = new Mock(); + mock.Setup(r => r.GetContext()).Returns(dbContext); + mock.Setup(r => r.GetDbSet()).Returns(dbContext.Set()); + return mock.Object; + } + + void ResolveInverseRelationships(AppDbContext context) + { + new InverseRelationships(ResourceGraph.Instance, new DbContextResolver(context)).Resolve(); + } + + Mock> CreateResourceDefinition + (IHooksDiscovery discovery + ) + where TModel : class, IIdentifiable + { + var resourceDefinition = new Mock>(); + MockHooks(resourceDefinition); + return resourceDefinition; + } + } +} + diff --git a/test/UnitTests/Services/EntityResourceService_Tests.cs b/test/UnitTests/Services/EntityResourceService_Tests.cs index 4380a6622b..0643110b21 100644 --- a/test/UnitTests/Services/EntityResourceService_Tests.cs +++ b/test/UnitTests/Services/EntityResourceService_Tests.cs @@ -73,6 +73,6 @@ public async Task GetRelationshipAsync_Returns_Relationship_Value() } private EntityResourceService GetService() => - new EntityResourceService(_jsonApiContextMock.Object, _repositoryMock.Object, _loggerFactory); + new EntityResourceService(_jsonApiContextMock.Object, _repositoryMock.Object, _loggerFactory, null); } } diff --git a/test/UnitTests/UnitTests.csproj b/test/UnitTests/UnitTests.csproj index b88e85582a..1e344d064b 100644 --- a/test/UnitTests/UnitTests.csproj +++ b/test/UnitTests/UnitTests.csproj @@ -8,15 +8,22 @@ - + + PreserveNewest + + + + + +