From 2341ac4b51167e6821025b02a016bacc9f1df4b9 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 9 Aug 2017 22:16:01 -0500 Subject: [PATCH 01/38] feat(models): initial operation models --- .../Controllers/QueryParams.cs | 2 - .../Models/Operations/Operation.cs | 53 +++++++++++++++++++ .../Models/Operations/OperationCode.cs | 10 ++++ .../Models/Operations/ResourceReference.cs | 16 ++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 src/JsonApiDotNetCore/Models/Operations/Operation.cs create mode 100644 src/JsonApiDotNetCore/Models/Operations/OperationCode.cs create mode 100644 src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs diff --git a/src/JsonApiDotNetCore/Controllers/QueryParams.cs b/src/JsonApiDotNetCore/Controllers/QueryParams.cs index 7e59f976c5..4c963098ad 100644 --- a/src/JsonApiDotNetCore/Controllers/QueryParams.cs +++ b/src/JsonApiDotNetCore/Controllers/QueryParams.cs @@ -1,5 +1,3 @@ -using System; - namespace JsonApiDotNetCore.Controllers { public enum QueryParams diff --git a/src/JsonApiDotNetCore/Models/Operations/Operation.cs b/src/JsonApiDotNetCore/Models/Operations/Operation.cs new file mode 100644 index 0000000000..533af2e109 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/Operations/Operation.cs @@ -0,0 +1,53 @@ +using System.Collections; +using System.Collections.Generic; +using JsonApiDotNetCore.Controllers; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace JsonApiDotNetCore.Models.Operations +{ + public class Operation : DocumentBase + { + [JsonProperty("op")] + public OperationCode Op { get; set; } + + [JsonProperty("ref")] + public ResourceReference Ref { get; set; } + + [JsonProperty("params")] + public QueryParams Params { get; set; } + + [JsonProperty("data")] + public object Data + { + get + { + if (DataIsList) return DataList; + return DataObject; + } + set => SetData(value); + } + + private void SetData(object data) + { + if (data is JArray jArray) { + DataIsList = true; + DataList = jArray.ToObject>(); + } + else if (data is List dataList) { + DataIsList = true; + DataList = dataList; + } + else if (data is JObject jObject) { + DataObject = jObject.ToObject(); + } + else if (data is DocumentData dataObject) { + DataObject = dataObject; + } + } + + public bool DataIsList { get; private set; } + public List DataList { get; private set; } + public DocumentData DataObject { get; private set; } + } +} diff --git a/src/JsonApiDotNetCore/Models/Operations/OperationCode.cs b/src/JsonApiDotNetCore/Models/Operations/OperationCode.cs new file mode 100644 index 0000000000..ffe3310985 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/Operations/OperationCode.cs @@ -0,0 +1,10 @@ +namespace JsonApiDotNetCore.Models.Operations +{ + public enum OperationCode + { + get = 1, + add = 2, + replace = 3, + remove = 4 + } +} diff --git a/src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs b/src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs new file mode 100644 index 0000000000..a8caa7ca05 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; + +namespace JsonApiDotNetCore.Models.Operations +{ + public class ResourceReference + { + [JsonProperty("type")] + public object Type { get; set; } + + [JsonProperty("id")] + public object Id { get; set; } + + [JsonProperty("relationship")] + public string Relationship { get; set; } + } +} From 5a2f49a50a0e74b61bfb4170d7ad8cb5507669dd Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 9 Aug 2017 22:16:33 -0500 Subject: [PATCH 02/38] feat(pointers): first pass at OperationsPointer --- .../JsonApiDotNetCore.csproj | 3 +- .../Models/Pointers/OperationsPointer.cs | 84 +++++++++++++++++++ .../Models/Pointers/Pointer.cs | 22 +++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs create mode 100644 src/JsonApiDotNetCore/Models/Pointers/Pointer.cs diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj index c3c987f32a..a67648a417 100755 --- a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj @@ -19,6 +19,7 @@ + - + \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs new file mode 100644 index 0000000000..61b9b9b166 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models.Operations; + +namespace JsonApiDotNetCore.Models.Pointers +{ + public class OperationsPointer : Pointer + { + /// + /// + /// + /// + public override object GetValue(object root) + { + if (root == null) throw new ArgumentNullException(nameof(root)); + if (PointerAddress == null) throw new InvalidOperationException("Cannot get pointer value from null PointerAddress"); + + if (root is List operations) + return GetValueFromRoot(operations); + + throw new ArgumentException(nameof(root)); + } + + private object GetValueFromRoot(List operations) + { + var pathSegments = PointerAddress.Split('/'); + + if(pathSegments.Length < 4) + throw BadRequestException("number of segments", pathSegments.Length); + + if (pathSegments[0] != "operations") + throw BadRequestException("prefix", pathSegments[0]); + + // /operations/{operationIndex} → operations = [...] + if(int.TryParse(pathSegments[1], out int operationIndex)) + return GetValueFromOperation(operations[operationIndex], pathSegments); + else + throw BadRequestException("operation index", operationIndex); + } + + private object GetValueFromOperation(Operation operation, string[] pathSegments) + { + var operationPropertyName = pathSegments[2]; + if(operationPropertyName != "data") + throw BadRequestException("operation property name", operationPropertyName); + + // /operations/0/data → data = {...} + if(operation.DataIsList == false) + return GetValueFromData(operation.DataObject, pathSegments, segementStartIndex: 3); + + // /operations/0/data/{dataIndex} → data = [...] + if(int.TryParse(pathSegments[3], out int dataIndex)) { + if(operation.DataList.Count >= dataIndex - 1) + return GetValueFromData(operation.DataList[dataIndex], pathSegments, segementStartIndex: 4); + throw BadRequestException("data index", dataIndex, "Pointer references an index in the data array that cannot be found at the specified position."); + } + else { + throw BadRequestException("data index", dataIndex, "Pointer segement should provide array index but could not be parsed to an integer."); + } + } + + private object GetValueFromData(DocumentData data, string[] pathSegments, int segementStartIndex) + { + // /operations/0/data/{dataPropertyName} + if(pathSegments.Length <= segementStartIndex) + throw BadRequestException("length", pathSegments.Length, "Pointer does not contain enough segments to locate data property."); + + var dataPropertyName = pathSegments[segementStartIndex]; + switch(dataPropertyName) + { + case "id": + return data.Id; + case "type": + return data.Type; + default: + throw BadRequestException("data property name", dataPropertyName, "Only 'id' and 'type' pointers are supported."); + } + } + + private JsonApiException BadRequestException(string condition, object value, string extraDetail = null) + => new JsonApiException(400, $"Operations pointer has invalid {condition} '{value}' in pointer '{PointerAddress}'. {extraDetail}"); + } +} diff --git a/src/JsonApiDotNetCore/Models/Pointers/Pointer.cs b/src/JsonApiDotNetCore/Models/Pointers/Pointer.cs new file mode 100644 index 0000000000..ecb25f314c --- /dev/null +++ b/src/JsonApiDotNetCore/Models/Pointers/Pointer.cs @@ -0,0 +1,22 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Schema; + +namespace JsonApiDotNetCore.Models.Pointers +{ + public abstract class Pointer + { + private static JSchema JsonSchema { get; } = JSchema.Parse("{ 'pointer': {'type': 'string'} }"); + + /// + /// Location represented by the pointer + /// + /// /operations/0/data/id + [JsonProperty("pointer")] + public string PointerAddress { get; set; } + + /// + /// Get the value located at the PointerAddress in the supplied object + /// + public abstract object GetValue(object root); + } +} From 9464d6834e104860a9d555f0e5f0f1188effdbb5 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 10 Aug 2017 22:56:48 -0500 Subject: [PATCH 03/38] feat(pointers): wrap up OperationsPointers and tests --- .../Builders/DocumentBuilder.cs | 10 +- .../Models/Pointers/OperationsPointer.cs | 2 +- .../Models/RelationshipData.cs | 12 +- .../Serialization/JsonApiDeSerializer.cs | 6 +- .../Models/Pointers/OperationsPointerTests.cs | 145 ++++++++++++++++++ 5 files changed, 160 insertions(+), 15 deletions(-) create mode 100644 test/UnitTests/Models/Pointers/OperationsPointerTests.cs diff --git a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs index d8d38390d8..ae102111c3 100644 --- a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs @@ -227,29 +227,29 @@ private bool RelationshipIsIncluded(string relationshipName) _jsonApiContext.IncludedRelationships.Contains(relationshipName); } - private List> GetRelationships(IEnumerable entities) + private List> GetRelationships(IEnumerable entities) { var objType = entities.GetType().GenericTypeArguments[0]; var typeName = _jsonApiContext.ContextGraph.GetContextEntity(objType); - var relationships = new List>(); + var relationships = new List>(); foreach (var entity in entities) { - relationships.Add(new Dictionary { + relationships.Add(new Dictionary { {"type", typeName.EntityName }, {"id", ((IIdentifiable)entity).StringId } }); } return relationships; } - private Dictionary GetRelationship(object entity) + private Dictionary GetRelationship(object entity) { var objType = entity.GetType(); var typeName = _jsonApiContext.ContextGraph.GetContextEntity(objType); - return new Dictionary { + return new Dictionary { {"type", typeName.EntityName }, {"id", ((IIdentifiable)entity).StringId } }; diff --git a/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs index 61b9b9b166..5c5d852b25 100644 --- a/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs +++ b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs @@ -24,7 +24,7 @@ public override object GetValue(object root) private object GetValueFromRoot(List operations) { - var pathSegments = PointerAddress.Split('/'); + var pathSegments = PointerAddress.Split(new [] { '/' } , StringSplitOptions.RemoveEmptyEntries); if(pathSegments.Length < 4) throw BadRequestException("number of segments", pathSegments.Length); diff --git a/src/JsonApiDotNetCore/Models/RelationshipData.cs b/src/JsonApiDotNetCore/Models/RelationshipData.cs index 21efa7409c..f74651318e 100644 --- a/src/JsonApiDotNetCore/Models/RelationshipData.cs +++ b/src/JsonApiDotNetCore/Models/RelationshipData.cs @@ -20,20 +20,20 @@ public object ExposedData { set { if(value is IEnumerable) if(value is JObject jObject) - SingleData = jObject.ToObject>(); + SingleData = jObject.ToObject>(); else if(value is JArray jArray) - ManyData = jArray.ToObject>>(); + ManyData = jArray.ToObject>>(); else - ManyData = (List>)value; + ManyData = (List>)value; else - SingleData = (Dictionary)value; + SingleData = (Dictionary)value; } } [JsonIgnore] - public List> ManyData { get; set; } + public List> ManyData { get; set; } [JsonIgnore] - public Dictionary SingleData { get; set; } + public Dictionary SingleData { get; set; } } } diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index d8cbf245bf..021adbe538 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -176,7 +176,7 @@ private object SetHasOneRelationship(object entity, var relationshipAttr = _jsonApiContext.RequestEntity.Relationships .SingleOrDefault(r => r.PublicRelationshipName == relationshipName); - var data = (Dictionary)relationshipData.ExposedData; + var data = (Dictionary)relationshipData.ExposedData; if (data == null) return entity; @@ -206,12 +206,12 @@ private object SetHasManyRelationship(object entity, if (relationships.TryGetValue(relationshipName, out RelationshipData relationshipData)) { - var data = (List>)relationshipData.ExposedData; + var data = (List>)relationshipData.ExposedData; if (data == null) return entity; var genericProcessor = _genericProcessorFactory.GetProcessor(attr.Type); - var ids = relationshipData.ManyData.Select(r => r["id"]); + var ids = relationshipData.ManyData.Select(r => r["id"].ToString()); genericProcessor.SetRelationships(entity, attr, ids); } diff --git a/test/UnitTests/Models/Pointers/OperationsPointerTests.cs b/test/UnitTests/Models/Pointers/OperationsPointerTests.cs new file mode 100644 index 0000000000..4a82e1a164 --- /dev/null +++ b/test/UnitTests/Models/Pointers/OperationsPointerTests.cs @@ -0,0 +1,145 @@ +using System.Collections.Generic; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Models.Pointers; +using Newtonsoft.Json; +using Xunit; + +namespace UnitTests.Models.Pointers +{ + public class OperationsPointerTests + { + [Fact] + public void GetValue_Can_Get_Value_From_Data_Id() + { + // arrange + var json = @"[ + { + ""op"": ""add"", + ""data"": { + ""id"": ""1"", + ""type"": ""authors"", + ""attributes"": { + ""name"": ""dgeb"" + } + } + }]"; + var operations = JsonConvert.DeserializeObject>(json); + var pointerJson = @"{ ""pointer"": ""/operations/0/data/id"" }"; + var pointer = JsonConvert.DeserializeObject(pointerJson); + var value = pointer.GetValue(operations); + Assert.Equal("1", value.ToString()); + } + + [Fact] + public void GetValue_Can_Get_Value_From_Data_Type() + { + // arrange + var json = @"[ + { + ""op"": ""add"", + ""data"": { + ""id"": ""1"", + ""type"": ""authors"", + ""attributes"": { + ""name"": ""dgeb"" + } + } + }]"; + var operations = JsonConvert.DeserializeObject>(json); + var pointerJson = @"{ ""pointer"": ""/operations/0/data/type"" }"; + var pointer = JsonConvert.DeserializeObject(pointerJson); + var value = pointer.GetValue(operations); + Assert.Equal("authors", value.ToString()); + } + + [Fact] + public void GetValue_Can_Get_Value_From_ListData_Id() + { + // arrange + var json = @"[ + { + ""op"": ""get"", + ""data"": [{ + ""id"": ""1"", + ""type"": ""authors"", + ""attributes"": { + ""name"": ""dgeb"" + } + }, { + ""id"": ""2"", + ""type"": ""authors"", + ""attributes"": { + ""name"": ""jaredcnance"" + } + }] + }]"; + var operations = JsonConvert.DeserializeObject>(json); + var pointerJson = @"{ ""pointer"": ""/operations/0/data/1/id"" }"; + var pointer = JsonConvert.DeserializeObject(pointerJson); + var value = pointer.GetValue(operations); + Assert.Equal("2", value.ToString()); + } + + [Fact] + public void GetValue_Can_Get_Value_From_Second_Operations_Data_Id() + { + // arrange + var json = @"[ + { + ""op"": ""get"", + ""data"": { + ""id"": ""1"", + ""type"": ""authors"", + ""attributes"": { + ""name"": ""dgeb"" + } + } + },{ + ""op"": ""get"", + ""data"": { + ""id"": ""2"", + ""type"": ""authors"", + ""attributes"": { + ""name"": ""jaredcnance"" + } + } + }]"; + var operations = JsonConvert.DeserializeObject>(json); + var pointerJson = @"{ ""pointer"": ""/operations/1/data/id"" }"; + var pointer = JsonConvert.DeserializeObject(pointerJson); + var value = pointer.GetValue(operations); + Assert.Equal("2", value.ToString()); + } + + [Fact] + public void GetValue_Can_Get_Value_From_Second_Operations_Data_Type() + { + // arrange + var json = @"[ + { + ""op"": ""get"", + ""data"": { + ""id"": ""1"", + ""type"": ""authors"", + ""attributes"": { + ""name"": ""dgeb"" + } + } + },{ + ""op"": ""get"", + ""data"": { + ""id"": ""1"", + ""type"": ""articles"", + ""attributes"": { + ""name"": ""JSON API paints my bikeshed!"" + } + } + }]"; + var operations = JsonConvert.DeserializeObject>(json); + var pointerJson = @"{ ""pointer"": ""/operations/1/data/type"" }"; + var pointer = JsonConvert.DeserializeObject(pointerJson); + var value = pointer.GetValue(operations); + Assert.Equal("articles", value.ToString()); + } + } +} \ No newline at end of file From 24e7a99c50343269995c1fdc4011c168ba35de90 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 24 Aug 2017 21:06:13 -0500 Subject: [PATCH 04/38] feat(pointers): finish pointer modeling and eval --- src/JsonApiDotNetCore/Models/DocumentData.cs | 2 +- .../Models/Operations/Operation.cs | 4 +- .../Models/Operations/Params.cs | 13 +++++ .../Models/Pointers/OperationsPointer.cs | 52 ++++++++++++++----- .../Models/Pointers/OperationsPointerTests.cs | 19 +++++++ 5 files changed, 72 insertions(+), 18 deletions(-) create mode 100644 src/JsonApiDotNetCore/Models/Operations/Params.cs diff --git a/src/JsonApiDotNetCore/Models/DocumentData.cs b/src/JsonApiDotNetCore/Models/DocumentData.cs index 32ca6f3f51..8c736f2922 100644 --- a/src/JsonApiDotNetCore/Models/DocumentData.cs +++ b/src/JsonApiDotNetCore/Models/DocumentData.cs @@ -13,7 +13,7 @@ public class DocumentData [JsonProperty("attributes")] public Dictionary Attributes { get; set; } - + [JsonProperty("relationships")] public Dictionary Relationships { get; set; } } diff --git a/src/JsonApiDotNetCore/Models/Operations/Operation.cs b/src/JsonApiDotNetCore/Models/Operations/Operation.cs index 533af2e109..558d224d04 100644 --- a/src/JsonApiDotNetCore/Models/Operations/Operation.cs +++ b/src/JsonApiDotNetCore/Models/Operations/Operation.cs @@ -1,6 +1,4 @@ -using System.Collections; using System.Collections.Generic; -using JsonApiDotNetCore.Controllers; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -15,7 +13,7 @@ public class Operation : DocumentBase public ResourceReference Ref { get; set; } [JsonProperty("params")] - public QueryParams Params { get; set; } + public Params Params { get; set; } [JsonProperty("data")] public object Data diff --git a/src/JsonApiDotNetCore/Models/Operations/Params.cs b/src/JsonApiDotNetCore/Models/Operations/Params.cs new file mode 100644 index 0000000000..470e8f4aa3 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/Operations/Params.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace JsonApiDotNetCore.Models.Operations +{ + public class Params + { + public List Include { get; set; } + public List Sort { get; set; } + public Dictionary Filter { get; set; } + public string Page { get; set; } + public Dictionary Fields { get; set; } + } +} diff --git a/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs index 5c5d852b25..f245ea4414 100644 --- a/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs +++ b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs @@ -15,8 +15,8 @@ public override object GetValue(object root) { if (root == null) throw new ArgumentNullException(nameof(root)); if (PointerAddress == null) throw new InvalidOperationException("Cannot get pointer value from null PointerAddress"); - - if (root is List operations) + + if (root is List operations) return GetValueFromRoot(operations); throw new ArgumentException(nameof(root)); @@ -24,16 +24,16 @@ public override object GetValue(object root) private object GetValueFromRoot(List operations) { - var pathSegments = PointerAddress.Split(new [] { '/' } , StringSplitOptions.RemoveEmptyEntries); + var pathSegments = PointerAddress.ToLower().Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); - if(pathSegments.Length < 4) + if (pathSegments.Length < 4) throw BadRequestException("number of segments", pathSegments.Length); if (pathSegments[0] != "operations") throw BadRequestException("prefix", pathSegments[0]); // /operations/{operationIndex} → operations = [...] - if(int.TryParse(pathSegments[1], out int operationIndex)) + if (int.TryParse(pathSegments[1], out int operationIndex)) return GetValueFromOperation(operations[operationIndex], pathSegments); else throw BadRequestException("operation index", operationIndex); @@ -42,32 +42,56 @@ private object GetValueFromRoot(List operations) private object GetValueFromOperation(Operation operation, string[] pathSegments) { var operationPropertyName = pathSegments[2]; - if(operationPropertyName != "data") - throw BadRequestException("operation property name", operationPropertyName); - + + // /operations/0/ref → ref = {...} + if (operationPropertyName == "ref") + return GetValueFromRef(operation.Ref, pathSegments); + // /operations/0/data → data = {...} - if(operation.DataIsList == false) + if (operation.DataIsList == false) return GetValueFromData(operation.DataObject, pathSegments, segementStartIndex: 3); // /operations/0/data/{dataIndex} → data = [...] - if(int.TryParse(pathSegments[3], out int dataIndex)) { - if(operation.DataList.Count >= dataIndex - 1) + if (int.TryParse(pathSegments[3], out int dataIndex)) + { + if (operation.DataList.Count >= dataIndex - 1) return GetValueFromData(operation.DataList[dataIndex], pathSegments, segementStartIndex: 4); throw BadRequestException("data index", dataIndex, "Pointer references an index in the data array that cannot be found at the specified position."); } - else { + else + { throw BadRequestException("data index", dataIndex, "Pointer segement should provide array index but could not be parsed to an integer."); } } + private object GetValueFromRef(ResourceReference reference, string[] pathSegments) + { + const int segementStartIndex = 3; + + // /operations/0/ref/{dataPropertyName} + if (pathSegments.Length <= segementStartIndex) + throw BadRequestException("length", pathSegments.Length, "Pointer does not contain enough segments to locate ref property."); + + var dataPropertyName = pathSegments[segementStartIndex]; + switch (dataPropertyName) + { + case "id": + return reference.Id; + case "type": + return reference.Type; + default: + throw BadRequestException("ref property name", dataPropertyName, "Only 'id' and 'type' pointers are supported."); + } + } + private object GetValueFromData(DocumentData data, string[] pathSegments, int segementStartIndex) { // /operations/0/data/{dataPropertyName} - if(pathSegments.Length <= segementStartIndex) + if (pathSegments.Length <= segementStartIndex) throw BadRequestException("length", pathSegments.Length, "Pointer does not contain enough segments to locate data property."); var dataPropertyName = pathSegments[segementStartIndex]; - switch(dataPropertyName) + switch (dataPropertyName) { case "id": return data.Id; diff --git a/test/UnitTests/Models/Pointers/OperationsPointerTests.cs b/test/UnitTests/Models/Pointers/OperationsPointerTests.cs index 4a82e1a164..9aafc284dc 100644 --- a/test/UnitTests/Models/Pointers/OperationsPointerTests.cs +++ b/test/UnitTests/Models/Pointers/OperationsPointerTests.cs @@ -8,6 +8,25 @@ namespace UnitTests.Models.Pointers { public class OperationsPointerTests { + [Fact] + public void GetValue_Can_Get_Value_From_Ref_Id() + { + // arrange + var json = @"[ + { + ""op"": ""add"", + ""ref"": { + ""type"": ""articles"", + ""id"": ""1"" + } + }]"; + var operations = JsonConvert.DeserializeObject>(json); + var pointerJson = @"{ ""pointer"": ""/operations/0/ref/id"" }"; + var pointer = JsonConvert.DeserializeObject(pointerJson); + var value = pointer.GetValue(operations); + Assert.Equal("1", value.ToString()); + } + [Fact] public void GetValue_Can_Get_Value_From_Data_Id() { From d64709ee97f56cda9796f9c12fa7c7b2d9b2ad96 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 24 Aug 2017 23:14:38 -0500 Subject: [PATCH 05/38] first pass at pointer replacement and service location --- .../Builders/ContextGraphBuilder.cs | 6 ++- .../Builders/IContextGraphBuilder.cs | 3 +- .../Data/DefaultEntityRepository.cs | 2 +- .../Internal/ContextEntity.cs | 1 + .../Generics/GenericProcessorFactory.cs | 12 ++--- .../Generics/IGenericProcessorFactory.cs | 4 +- src/JsonApiDotNetCore/Models/DocumentData.cs | 47 ++++++++++++++++++- .../Models/Operations/Operation.cs | 11 +++++ .../Models/Pointers/OperationsPointer.cs | 2 +- .../Models/Pointers/Pointer.cs | 4 +- .../Serialization/IJsonApiDeSerializer.cs | 2 + .../Serialization/JsonApiDeSerializer.cs | 8 ++-- .../Services/Contract/ICreateService.cs | 1 - .../Services/Contract/IDeleteService.cs | 1 - .../Services/Contract/IGetByIdService.cs | 1 - .../Contract/IGetRelationshipService.cs | 1 - .../Contract/IGetRelationshipsService.cs | 1 - .../Services/Contract/IUpdateService.cs | 1 - .../Services/EntityResourceService.cs | 2 +- .../Services/Operations/CreateOpProcessor.cs | 41 ++++++++++++++++ .../Services/Operations/IOpProcessor.cs | 16 +++++++ .../Operations/IOperationsProcessor.cs | 45 ++++++++++++++++++ .../Operations/OperationProcessorResolver.cs | 44 +++++++++++++++++ 23 files changed, 228 insertions(+), 28 deletions(-) create mode 100644 src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs create mode 100644 src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs create mode 100644 src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs create mode 100644 src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs diff --git a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs index e47dec2065..c5099bf298 100644 --- a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs @@ -28,7 +28,10 @@ public IContextGraph Build() return graph; } - public void AddResource(string pluralizedTypeName) where TResource : class + public void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable + => AddResource(pluralizedTypeName); + + public void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable { var entityType = typeof(TResource); @@ -38,6 +41,7 @@ public void AddResource(string pluralizedTypeName) where TResource : { EntityName = pluralizedTypeName, EntityType = entityType, + IdentityType = typeof(TId), Attributes = GetAttributes(entityType), Relationships = GetRelationships(entityType) }); diff --git a/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs index bab62cca64..5844166c18 100644 --- a/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs @@ -8,7 +8,8 @@ public interface IContextGraphBuilder { Link DocumentLinks { get; set; } IContextGraph Build(); - void AddResource(string pluralizedTypeName) where TResource : class; + void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable; + void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable; void AddDbContext() where T : DbContext; } } diff --git a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs index 1199389c60..66804abee5 100644 --- a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs +++ b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs @@ -137,7 +137,7 @@ public virtual async Task UpdateAsync(TId id, TEntity entity) public async Task UpdateRelationshipsAsync(object parent, RelationshipAttribute relationship, IEnumerable relationshipIds) { - var genericProcessor = _genericProcessorFactory.GetProcessor(relationship.Type); + var genericProcessor = _genericProcessorFactory.GetProcessor(relationship.Type); await genericProcessor.UpdateRelationshipsAsync(parent, relationship, relationshipIds); } diff --git a/src/JsonApiDotNetCore/Internal/ContextEntity.cs b/src/JsonApiDotNetCore/Internal/ContextEntity.cs index 4843d245c1..ff539b79ea 100644 --- a/src/JsonApiDotNetCore/Internal/ContextEntity.cs +++ b/src/JsonApiDotNetCore/Internal/ContextEntity.cs @@ -8,6 +8,7 @@ public class ContextEntity { public string EntityName { get; set; } public Type EntityType { get; set; } + public Type IdentityType { get; set; } public List Attributes { get; set; } public List Relationships { get; set; } public Link Links { get; set; } = Link.All; diff --git a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs index a238e4ef9f..0918da40d1 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs @@ -1,24 +1,20 @@ using System; -using Microsoft.EntityFrameworkCore; namespace JsonApiDotNetCore.Internal.Generics { public class GenericProcessorFactory : IGenericProcessorFactory { - private readonly DbContext _dbContext; private readonly IServiceProvider _serviceProvider; - public GenericProcessorFactory(DbContext dbContext, - IServiceProvider serviceProvider) + public GenericProcessorFactory(IServiceProvider serviceProvider) { - _dbContext = dbContext; _serviceProvider = serviceProvider; } - public IGenericProcessor GetProcessor(Type type) + public TInterface GetProcessor(Type[] types) { - var processorType = typeof(GenericProcessor<>).MakeGenericType(type); - return (IGenericProcessor)_serviceProvider.GetService(processorType); + var processorType = typeof(GenericProcessor<>).MakeGenericType(types); + return (TInterface)_serviceProvider.GetService(processorType); } } } diff --git a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs b/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs index 83e794a12b..ecd2c7cdc4 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs @@ -5,10 +5,12 @@ namespace JsonApiDotNetCore.Internal.Generics /// /// Used to generate a generic operations processor when the types /// are not know until runtime. The typical use case would be for + /// accessing relationship data.be for /// accessing relationship data. /// public interface IGenericProcessorFactory { - IGenericProcessor GetProcessor(Type type); + + TInterface GetProcessor(params Type[] types); } } diff --git a/src/JsonApiDotNetCore/Models/DocumentData.cs b/src/JsonApiDotNetCore/Models/DocumentData.cs index 8c736f2922..d87958f37c 100644 --- a/src/JsonApiDotNetCore/Models/DocumentData.cs +++ b/src/JsonApiDotNetCore/Models/DocumentData.cs @@ -1,15 +1,18 @@ using System.Collections.Generic; +using JsonApiDotNetCore.Models.Pointers; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Schema; namespace JsonApiDotNetCore.Models { public class DocumentData { [JsonProperty("type")] - public string Type { get; set; } + public object Type { get; set; } [JsonProperty("id")] - public string Id { get; set; } + public object Id { get; set; } [JsonProperty("attributes")] public Dictionary Attributes { get; set; } @@ -17,4 +20,44 @@ public class DocumentData [JsonProperty("relationships")] public Dictionary Relationships { get; set; } } + + public class DocumentDataPointerReplacement + where TPointer : Pointer, new() + { + private readonly DocumentData _data; + + public DocumentDataPointerReplacement(DocumentData data) + { + _data = data; + } + + public void ReplacePointers(List parentDoc) + { + ReplacePointer(_data.Id, parentDoc); + ReplacePointer(_data.Type, parentDoc); + } + + private void ReplacePointer(object reference, List parentDoc) + { + if (reference is JObject jObj) + if (jObj.TryParse(Pointer.JsonSchema, out Pointer pointer)) + reference = pointer.GetValue(parentDoc); + } + } } + +public static class JObjectExtensions +{ + public static bool TryParse(this JObject obj, JSchema schema, out Pointer pointer) + where TPointer : Pointer, new() + { + if (obj.IsValid(schema)) + { + pointer = obj.ToObject(); + return true; + } + + pointer = null; + return false; + } +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Models/Operations/Operation.cs b/src/JsonApiDotNetCore/Models/Operations/Operation.cs index 558d224d04..1493142b9f 100644 --- a/src/JsonApiDotNetCore/Models/Operations/Operation.cs +++ b/src/JsonApiDotNetCore/Models/Operations/Operation.cs @@ -47,5 +47,16 @@ private void SetData(object data) public bool DataIsList { get; private set; } public List DataList { get; private set; } public DocumentData DataObject { get; private set; } + + public string GetResourceTypeName() + { + if(Ref != null) + return Ref.Type?.ToString(); + + if(DataIsList) + return DataList[0].Type?.ToString(); + + return DataObject.Type?.ToString(); + } } } diff --git a/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs index f245ea4414..0df8f64e72 100644 --- a/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs +++ b/src/JsonApiDotNetCore/Models/Pointers/OperationsPointer.cs @@ -5,7 +5,7 @@ namespace JsonApiDotNetCore.Models.Pointers { - public class OperationsPointer : Pointer + public class OperationsPointer : Pointer { /// /// diff --git a/src/JsonApiDotNetCore/Models/Pointers/Pointer.cs b/src/JsonApiDotNetCore/Models/Pointers/Pointer.cs index ecb25f314c..27f0083904 100644 --- a/src/JsonApiDotNetCore/Models/Pointers/Pointer.cs +++ b/src/JsonApiDotNetCore/Models/Pointers/Pointer.cs @@ -3,9 +3,9 @@ namespace JsonApiDotNetCore.Models.Pointers { - public abstract class Pointer + public abstract class Pointer { - private static JSchema JsonSchema { get; } = JSchema.Parse("{ 'pointer': {'type': 'string'} }"); + public static JSchema JsonSchema { get; } = JSchema.Parse("{ 'pointer': {'type': 'string'} }"); /// /// Location represented by the pointer diff --git a/src/JsonApiDotNetCore/Serialization/IJsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/IJsonApiDeSerializer.cs index 5fb91dae36..0355c962ed 100644 --- a/src/JsonApiDotNetCore/Serialization/IJsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/IJsonApiDeSerializer.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using JsonApiDotNetCore.Models; namespace JsonApiDotNetCore.Serialization { @@ -8,5 +9,6 @@ public interface IJsonApiDeSerializer TEntity Deserialize(string requestBody); object DeserializeRelationship(string requestBody); List DeserializeList(string requestBody); + object DocumentToObject(DocumentData data); } } \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index 021adbe538..a5168f6185 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -78,9 +78,9 @@ public List DeserializeList(string requestBody) } } - private object DocumentToObject(DocumentData data) + public object DocumentToObject(DocumentData data) { - var contextEntity = _jsonApiContext.ContextGraph.GetContextEntity(data.Type); + var contextEntity = _jsonApiContext.ContextGraph.GetContextEntity(data.Type?.ToString()); _jsonApiContext.RequestEntity = contextEntity; var entity = Activator.CreateInstance(contextEntity.EntityType); @@ -91,7 +91,7 @@ private object DocumentToObject(DocumentData data) var identifiableEntity = (IIdentifiable)entity; if (data.Id != null) - identifiableEntity.StringId = data.Id; + identifiableEntity.StringId = data.Id?.ToString(); return identifiableEntity; } @@ -210,7 +210,7 @@ private object SetHasManyRelationship(object entity, if (data == null) return entity; - var genericProcessor = _genericProcessorFactory.GetProcessor(attr.Type); + var genericProcessor = _genericProcessorFactory.GetProcessor(attr.Type); var ids = relationshipData.ManyData.Select(r => r["id"].ToString()); genericProcessor.SetRelationships(entity, attr, ids); } diff --git a/src/JsonApiDotNetCore/Services/Contract/ICreateService.cs b/src/JsonApiDotNetCore/Services/Contract/ICreateService.cs index a4c0cd6cbb..df4916856d 100644 --- a/src/JsonApiDotNetCore/Services/Contract/ICreateService.cs +++ b/src/JsonApiDotNetCore/Services/Contract/ICreateService.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Models; diff --git a/src/JsonApiDotNetCore/Services/Contract/IDeleteService.cs b/src/JsonApiDotNetCore/Services/Contract/IDeleteService.cs index 4ba09fdf40..52e4ca17f4 100644 --- a/src/JsonApiDotNetCore/Services/Contract/IDeleteService.cs +++ b/src/JsonApiDotNetCore/Services/Contract/IDeleteService.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Models; diff --git a/src/JsonApiDotNetCore/Services/Contract/IGetByIdService.cs b/src/JsonApiDotNetCore/Services/Contract/IGetByIdService.cs index 27761abd5d..c01c6a1391 100644 --- a/src/JsonApiDotNetCore/Services/Contract/IGetByIdService.cs +++ b/src/JsonApiDotNetCore/Services/Contract/IGetByIdService.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Models; diff --git a/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipService.cs b/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipService.cs index bd9c0b2be0..de32b77547 100644 --- a/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipService.cs +++ b/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipService.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Models; diff --git a/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipsService.cs b/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipsService.cs index a61cf8f7ac..e519d0b4d1 100644 --- a/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipsService.cs +++ b/src/JsonApiDotNetCore/Services/Contract/IGetRelationshipsService.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Models; diff --git a/src/JsonApiDotNetCore/Services/Contract/IUpdateService.cs b/src/JsonApiDotNetCore/Services/Contract/IUpdateService.cs index ca2e171090..bd5f13dd60 100644 --- a/src/JsonApiDotNetCore/Services/Contract/IUpdateService.cs +++ b/src/JsonApiDotNetCore/Services/Contract/IUpdateService.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Models; diff --git a/src/JsonApiDotNetCore/Services/EntityResourceService.cs b/src/JsonApiDotNetCore/Services/EntityResourceService.cs index 7db499fd5e..c8c150a108 100644 --- a/src/JsonApiDotNetCore/Services/EntityResourceService.cs +++ b/src/JsonApiDotNetCore/Services/EntityResourceService.cs @@ -133,7 +133,7 @@ public virtual async Task UpdateRelationshipsAsync(TId id, string relationshipNa .Relationships .FirstOrDefault(r => r.InternalRelationshipName == relationshipName); - var relationshipIds = relationships.Select(r => r.Id); + var relationshipIds = relationships.Select(r => r.Id?.ToString()); await _entities.UpdateRelationshipsAsync(entity, relationship, relationshipIds); } diff --git a/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs new file mode 100644 index 0000000000..53a91c2fa6 --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Serialization; + +namespace JsonApiDotNetCore.Services.Operations +{ + public class CreateOpProcessor : IOpProcessor + where T : class, IIdentifiable + { + private readonly ICreateService _service; + private readonly IJsonApiDeSerializer _deSerializer; + private readonly IDocumentBuilder _documentBuilder; + + public CreateOpProcessor( + ICreateService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder) + { + _service = service; + _deSerializer = deSerializer; + _documentBuilder = documentBuilder; + } + + public async Task ProcessAsync(Operation operation) + { + var model = (T)_deSerializer.DocumentToObject(operation.DataObject); + var result = await _service.CreateAsync(model); + + var operationResult = new Operation { + Op = OperationCode.add + }; + + operationResult.Data = _documentBuilder.Build(result); + + return operationResult; + } + } +} diff --git a/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs new file mode 100644 index 0000000000..fe36dd8a9a --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; + +namespace JsonApiDotNetCore.Services.Operations +{ + public interface IOpProcessor + { + Task ProcessAsync(Operation operation); + } + + public interface IOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } +} diff --git a/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs new file mode 100644 index 0000000000..8230730d69 --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Models.Pointers; + +namespace JsonApiDotNetCore.Services.Operations +{ + public interface IOperationsProcessor + { + Task> ProcessAsync(List inputOps); + } + + public class OperationsProcessor : IOperationsProcessor + { + private readonly IOperationProcessorResolver _processorResolver; + + public OperationsProcessor(IOperationProcessorResolver processorResolver) + { + _processorResolver = processorResolver; + } + public async Task> ProcessAsync(List inputOps) + { + var outputOps = new List(); + + foreach(var op in inputOps) + { + // TODO: parse pointers: + // locate all objects within the document and replace them + var operationsPointer = new OperationsPointer(); + var replacer = new DocumentDataPointerReplacement(op.DataObject); + replacer.ReplacePointers(outputOps); + + /// + var processor = _processorResolver.LocateCreateService(op); + var resultOp = await processor.ProcessAsync(op); + outputOps.Add(resultOp); + } + for(var i=0; i < inputOps.Count; i++) + { + + } + } + } +} diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs new file mode 100644 index 0000000000..98cf03a892 --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs @@ -0,0 +1,44 @@ +using System.Collections.Concurrent; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Internal.Generics; +using JsonApiDotNetCore.Models.Operations; + +namespace JsonApiDotNetCore.Services.Operations +{ + public interface IOperationProcessorResolver + { + IOpProcessor LocateCreateService(Operation operation); + } + + public class OperationProcessorResolver : IOperationProcessorResolver + { + private readonly IGenericProcessorFactory _processorFactory; + private readonly IJsonApiContext _context; + private ConcurrentDictionary _cachedProcessors = new ConcurrentDictionary(); + + public OperationProcessorResolver( + IGenericProcessorFactory processorFactory, + IJsonApiContext context) + { + _processorFactory = processorFactory; + _context = context; + } + + // TODO: there may be some optimizations here around the cache such as not caching processors + // if the request only contains a single op + public IOpProcessor LocateCreateService(Operation operation) + { + var resource = operation.GetResourceTypeName(); + + if (_cachedProcessors.TryGetValue(resource, out IOpProcessor cachedProcessor)) + return cachedProcessor; + + var contextEntity = _context.ContextGraph.GetContextEntity(); + var processor = _processorFactory.GetProcessor(contextEntity.EntityType, contextEntity.IdentityType); + + _cachedProcessors[resource] = processor; + + return processor; + } + } +} From 8d1001613052e432584765273c60f503b1f56489 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Fri, 25 Aug 2017 23:44:00 -0500 Subject: [PATCH 06/38] chore(pointers): move classes into separate files --- .../Extensions/JObjectExtensions.cs | 23 +++++++ .../Generics/IGenericProcessorFactory.cs | 1 - src/JsonApiDotNetCore/Models/DocumentData.cs | 43 +------------ .../Operations/OperationsPointerExchanger.cs | 62 +++++++++++++++++++ 4 files changed, 86 insertions(+), 43 deletions(-) create mode 100644 src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs create mode 100644 src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs diff --git a/src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs b/src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs new file mode 100644 index 0000000000..ec997042fb --- /dev/null +++ b/src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs @@ -0,0 +1,23 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Schema; +using JsonApiDotNetCore.Models.Pointers; + +namespace JsonApiDotNetCore.Extensions +{ + public static class JObjectExtensions + { + public static bool TryParse(this JObject obj, JSchema schema, out Pointer pointer) + where TPointer : Pointer, new() + { + if (obj.IsValid(schema)) + { + pointer = obj.ToObject(); + return true; + } + + pointer = null; + return false; + } + } +} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs b/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs index ecd2c7cdc4..39df292e14 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs @@ -10,7 +10,6 @@ namespace JsonApiDotNetCore.Internal.Generics /// public interface IGenericProcessorFactory { - TInterface GetProcessor(params Type[] types); } } diff --git a/src/JsonApiDotNetCore/Models/DocumentData.cs b/src/JsonApiDotNetCore/Models/DocumentData.cs index d87958f37c..afd9c717cf 100644 --- a/src/JsonApiDotNetCore/Models/DocumentData.cs +++ b/src/JsonApiDotNetCore/Models/DocumentData.cs @@ -1,8 +1,7 @@ +using System; using System.Collections.Generic; using JsonApiDotNetCore.Models.Pointers; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Schema; namespace JsonApiDotNetCore.Models { @@ -20,44 +19,4 @@ public class DocumentData [JsonProperty("relationships")] public Dictionary Relationships { get; set; } } - - public class DocumentDataPointerReplacement - where TPointer : Pointer, new() - { - private readonly DocumentData _data; - - public DocumentDataPointerReplacement(DocumentData data) - { - _data = data; - } - - public void ReplacePointers(List parentDoc) - { - ReplacePointer(_data.Id, parentDoc); - ReplacePointer(_data.Type, parentDoc); - } - - private void ReplacePointer(object reference, List parentDoc) - { - if (reference is JObject jObj) - if (jObj.TryParse(Pointer.JsonSchema, out Pointer pointer)) - reference = pointer.GetValue(parentDoc); - } - } -} - -public static class JObjectExtensions -{ - public static bool TryParse(this JObject obj, JSchema schema, out Pointer pointer) - where TPointer : Pointer, new() - { - if (obj.IsValid(schema)) - { - pointer = obj.ToObject(); - return true; - } - - pointer = null; - return false; - } } \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs new file mode 100644 index 0000000000..87a7dbdc25 --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using JsonApiDotNetCore.Models.Pointers; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Schema; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Extensions; + +namespace JsonApiDotNetCore.Services.Operations +{ + public class DocumentDataPointerReplacement + where TPointer : Pointer, new() + { + private readonly DocumentData _data; + + public DocumentDataPointerReplacement(DocumentData data) + { + _data = data; + } + + public void ReplacePointers(List parentDoc) + { + _data.Id = GetPointerValue(_data.Id, parentDoc); + _data.Type = GetPointerValue(_data.Type, parentDoc); + + if (_data.Relationships != null) + { + foreach (var relationshipDictionary in _data.Relationships) + { + if (relationshipDictionary.Value.IsHasMany) + { + foreach (var relationship in relationshipDictionary.Value.ManyData) + ReplaceDictionaryPointers(relationship, parentDoc); + } + else + { + ReplaceDictionaryPointers(relationshipDictionary.Value.SingleData, parentDoc); + } + } + } + } + + private void ReplaceDictionaryPointers(Dictionary relationship, List parentDoc) + { + if (relationship.ContainsKey("id")) + relationship["id"] = GetPointerValue(relationship["id"], parentDoc); + + if (relationship.ContainsKey("type")) + relationship["type"] = GetPointerValue(relationship["type"], parentDoc); + } + + private object GetPointerValue(object reference, List parentDoc) + { + if (reference is JObject jObj) + if (jObj.TryParse(Pointer.JsonSchema, out Pointer pointer)) + return pointer.GetValue(parentDoc); + + return reference; + } + } +} \ No newline at end of file From ac57c75158e63d5ac480dd29d527feca4aba5dcd Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Fri, 25 Aug 2017 23:44:27 -0500 Subject: [PATCH 07/38] feat(RelationshipData): expose IsHasMany property --- .../Models/RelationshipData.cs | 40 ++++++--- .../UnitTests/Models/RelationshipDataTests.cs | 90 +++++++++++++++++++ 2 files changed, 116 insertions(+), 14 deletions(-) create mode 100644 test/UnitTests/Models/RelationshipDataTests.cs diff --git a/src/JsonApiDotNetCore/Models/RelationshipData.cs b/src/JsonApiDotNetCore/Models/RelationshipData.cs index f74651318e..d81b2fe75a 100644 --- a/src/JsonApiDotNetCore/Models/RelationshipData.cs +++ b/src/JsonApiDotNetCore/Models/RelationshipData.cs @@ -11,29 +11,41 @@ public class RelationshipData public Links Links { get; set; } [JsonProperty("data")] - public object ExposedData { - get { - if(ManyData != null) + public object ExposedData + { + get + { + if (ManyData != null) return ManyData; return SingleData; } - set { - if(value is IEnumerable) - if(value is JObject jObject) - SingleData = jObject.ToObject>(); - else if(value is JArray jArray) - ManyData = jArray.ToObject>>(); - else - ManyData = (List>)value; - else + set + { + if (value is JObject jObject) + SingleData = jObject.ToObject>(); + else if (value is Dictionary dict) SingleData = (Dictionary)value; + else + SetManyData(value); } - } + } + + private void SetManyData(object value) + { + IsHasMany = true; + if (value is JArray jArray) + ManyData = jArray.ToObject>>(); + else + ManyData = (List>)value; + } [JsonIgnore] public List> ManyData { get; set; } - + [JsonIgnore] public Dictionary SingleData { get; set; } + + [JsonIgnore] + public bool IsHasMany { get; private set; } } } diff --git a/test/UnitTests/Models/RelationshipDataTests.cs b/test/UnitTests/Models/RelationshipDataTests.cs new file mode 100644 index 0000000000..780a5faa0b --- /dev/null +++ b/test/UnitTests/Models/RelationshipDataTests.cs @@ -0,0 +1,90 @@ +using JsonApiDotNetCore.Models; +using System.Collections.Generic; +using Xunit; +using Newtonsoft.Json.Linq; + +namespace UnitTests.Models +{ + public class RelationshipDataTests + { + [Fact] + public void Setting_ExposedData_To_List_Sets_ManyData() + { + // arrange + var relationshipData = new RelationshipData(); + var relationships = new List> { + new Dictionary { + { "authors", new { } } + } + }; + + // act + relationshipData.ExposedData = relationships; + + // assert + Assert.NotEmpty(relationshipData.ManyData); + Assert.True(relationshipData.ManyData[0].ContainsKey("authors")); + Assert.True(relationshipData.IsHasMany); + } + + [Fact] + public void Setting_ExposedData_To_JArray_Sets_ManyData() + { + // arrange + var relationshipData = new RelationshipData(); + var relationshipsJson = @"[ + { + ""authors"": {} + } + ]"; + + var relationships = JArray.Parse(relationshipsJson); + + // act + relationshipData.ExposedData = relationships; + + // assert + Assert.NotEmpty(relationshipData.ManyData); + Assert.True(relationshipData.ManyData[0].ContainsKey("authors")); + Assert.True(relationshipData.IsHasMany); + } + + [Fact] + public void Setting_ExposedData_To_Dictionary_Sets_SingleData() + { + // arrange + var relationshipData = new RelationshipData(); + var relationship = new Dictionary { + { "authors", new { } } + }; + + // act + relationshipData.ExposedData = relationship; + + // assert + Assert.NotNull(relationshipData.SingleData); + Assert.True(relationshipData.SingleData.ContainsKey("authors")); + Assert.False(relationshipData.IsHasMany); + } + + [Fact] + public void Setting_ExposedData_To_JObject_Sets_SingleData() + { + // arrange + var relationshipData = new RelationshipData(); + var relationshipJson = @"{ + ""authors"": {} + }"; + + var relationship = JObject.Parse(relationshipJson); + + // act + relationshipData.ExposedData = relationship; + + // assert + Assert.NotNull(relationshipData.SingleData); + Assert.True(relationshipData.SingleData.ContainsKey("authors")); + Assert.False(relationshipData.IsHasMany); + } + } +} From d3c3493786e83a749a81812c64ec8a4589ff41b8 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Fri, 25 Aug 2017 23:45:23 -0500 Subject: [PATCH 08/38] test(OperationsProcessor): performs pointer substitution --- .../Operations/IOperationsProcessor.cs | 10 +- .../Operations/OperationProcessorResolver.cs | 3 +- .../Operations/OperationsProcessorTests.cs | 94 +++++++++++++++++++ 3 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 test/UnitTests/Services/Operations/OperationsProcessorTests.cs diff --git a/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs index 8230730d69..0158caa081 100644 --- a/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs @@ -19,6 +19,7 @@ public OperationsProcessor(IOperationProcessorResolver processorResolver) { _processorResolver = processorResolver; } + public async Task> ProcessAsync(List inputOps) { var outputOps = new List(); @@ -31,15 +32,14 @@ public async Task> ProcessAsync(List inputOps) var replacer = new DocumentDataPointerReplacement(op.DataObject); replacer.ReplacePointers(outputOps); - /// var processor = _processorResolver.LocateCreateService(op); var resultOp = await processor.ProcessAsync(op); - outputOps.Add(resultOp); - } - for(var i=0; i < inputOps.Count; i++) - { + if(resultOp != null) + outputOps.Add(resultOp); } + + return outputOps; } } } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs index 98cf03a892..b56eb11bd6 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; -using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Internal.Generics; using JsonApiDotNetCore.Models.Operations; @@ -33,7 +32,7 @@ public IOpProcessor LocateCreateService(Operation operation) if (_cachedProcessors.TryGetValue(resource, out IOpProcessor cachedProcessor)) return cachedProcessor; - var contextEntity = _context.ContextGraph.GetContextEntity(); + var contextEntity = _context.ContextGraph.GetContextEntity(resource); var processor = _processorFactory.GetProcessor(contextEntity.EntityType, contextEntity.IdentityType); _cachedProcessors[resource] = processor; diff --git a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs new file mode 100644 index 0000000000..fadcd3be78 --- /dev/null +++ b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs @@ -0,0 +1,94 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Services.Operations; +using Moq; +using Newtonsoft.Json; +using Xunit; + +namespace UnitTests.Services +{ + public class OperationsProcessorTests + { + private readonly Mock _resolverMock; + + public OperationsProcessorTests() + { + _resolverMock = new Mock(); + } + + [Fact] + public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() + { + // arrange + var request = @"[ + { + ""op"": ""add"", + ""data"": { + ""type"": ""authors"", + ""attributes"": { + ""name"": ""dgeb"" + } + } + }, { + ""op"": ""add"", + ""data"": { + ""type"": ""articles"", + ""attributes"": { + ""title"": ""JSON API paints my bikeshed!"" + }, + ""relationships"": { + ""author"": { + ""data"": { + ""type"": ""authors"", + ""id"": { ""pointer"": ""/operations/0/data/id"" } + } + } + } + } + } + ]"; + + var op1Result = @"{ + ""links"": { + ""self"": ""http://example.com/authors/9"" + }, + ""data"": { + ""type"": ""authors"", + ""id"": ""9"", + ""attributes"": { + ""name"": ""dgeb"" + } + } + }"; + + var operations = JsonConvert.DeserializeObject>(request); + var addOperationResult = JsonConvert.DeserializeObject(op1Result); + + var opProcessorMock = new Mock(); + opProcessorMock.Setup(m => m.ProcessAsync(It.Is(op => op.DataObject.Type.ToString() == "authors"))) + .ReturnsAsync(addOperationResult); + + _resolverMock.Setup(m => m.LocateCreateService(It.IsAny())) + .Returns(opProcessorMock.Object); + + _resolverMock.Setup(m => m.LocateCreateService((It.IsAny()))) + .Returns(opProcessorMock.Object); + + var operationsProcessor = new OperationsProcessor(_resolverMock.Object); + + // act + var results = await operationsProcessor.ProcessAsync(operations); + + // assert + opProcessorMock.Verify( + m => m.ProcessAsync( + It.Is(o => + o.DataObject.Type.ToString() == "articles" + && o.DataObject.Relationships["author"].SingleData["id"].ToString() == "9" + ) + ) + ); + } + } +} From 4518cb63f4c49b710e36a4cb33cb40cdb0d4f1dd Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Fri, 25 Aug 2017 23:48:06 -0500 Subject: [PATCH 09/38] style(*): naming conventions and namespacr cleanup --- src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs | 1 - src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs | 1 - src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs | 1 - .../Services/Operations/OperationsPointerExchanger.cs | 3 --- .../{IOperationsProcessor.cs => OperationsProcessor.cs} | 1 - 5 files changed, 7 deletions(-) rename src/JsonApiDotNetCore/Services/Operations/{IOperationsProcessor.cs => OperationsProcessor.cs} (97%) diff --git a/src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs b/src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs index ec997042fb..70aa070fc6 100644 --- a/src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/JObjectExtensions.cs @@ -1,4 +1,3 @@ -using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Schema; using JsonApiDotNetCore.Models.Pointers; diff --git a/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs index 53a91c2fa6..1c8fb50603 100644 --- a/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Builders; using JsonApiDotNetCore.Models; diff --git a/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs index fe36dd8a9a..67cd0896ec 100644 --- a/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Threading.Tasks; using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs index 87a7dbdc25..7301353c3e 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs @@ -1,9 +1,6 @@ -using System; using System.Collections.Generic; using JsonApiDotNetCore.Models.Pointers; -using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Schema; using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Extensions; diff --git a/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs similarity index 97% rename from src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs rename to src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index 0158caa081..9449564f22 100644 --- a/src/JsonApiDotNetCore/Services/Operations/IOperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Threading.Tasks; -using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Models.Pointers; From c997facab0c4b30bb171309284028007b42ac57c Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Fri, 25 Aug 2017 23:48:59 -0500 Subject: [PATCH 10/38] style(processors): create namespace for individual processors --- .../Services/Operations/{ => Processors}/CreateOpProcessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/JsonApiDotNetCore/Services/Operations/{ => Processors}/CreateOpProcessor.cs (95%) diff --git a/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs similarity index 95% rename from src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs rename to src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs index 1c8fb50603..3004ba15ef 100644 --- a/src/JsonApiDotNetCore/Services/Operations/CreateOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs @@ -4,7 +4,7 @@ using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Serialization; -namespace JsonApiDotNetCore.Services.Operations +namespace JsonApiDotNetCore.Services.Operations.Processors { public class CreateOpProcessor : IOpProcessor where T : class, IIdentifiable From a34ef202b0cc6da22d4c057d2e404c87757d61b5 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sat, 26 Aug 2017 20:50:51 -0500 Subject: [PATCH 11/38] test(CreateOpProcessor): test and implement the create op processor --- .../Builders/ContextGraphBuilder.cs | 10 ++- .../Builders/DocumentBuilder.cs | 2 +- .../Builders/IContextGraphBuilder.cs | 6 +- .../Builders/IDocumentBuilder.cs | 2 + src/JsonApiDotNetCore/Models/DocumentData.cs | 2 - .../Processors/CreateOpProcessor.cs | 22 ++++- .../Processors/CreateOpProcessorTests.cs | 80 +++++++++++++++++++ 7 files changed, 113 insertions(+), 11 deletions(-) create mode 100644 test/UnitTests/Services/Operations/Processors/CreateOpProcessorTests.cs diff --git a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs index c5099bf298..efbc0535e1 100644 --- a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs @@ -28,10 +28,10 @@ public IContextGraph Build() return graph; } - public void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable + public IContextGraphBuilder AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable => AddResource(pluralizedTypeName); - public void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable + public IContextGraphBuilder AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable { var entityType = typeof(TResource); @@ -45,6 +45,8 @@ public void AddResource(string pluralizedTypeName) where TResour Attributes = GetAttributes(entityType), Relationships = GetRelationships(entityType) }); + + return this; } private Link GetLinkFlags(Type entityType) @@ -97,7 +99,7 @@ protected virtual Type GetRelationshipType(RelationshipAttribute relation, Prope return prop.PropertyType; } - public void AddDbContext() where T : DbContext + public IContextGraphBuilder AddDbContext() where T : DbContext { _usesDbContext = true; @@ -125,6 +127,8 @@ public void AddDbContext() where T : DbContext }); } } + + return this; } private string GetResourceName(PropertyInfo property) diff --git a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs index ae102111c3..c6439efbc8 100644 --- a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs @@ -104,7 +104,7 @@ private List AppendIncludedObject(List includedObjec return includedObject; } - private DocumentData GetData(ContextEntity contextEntity, IIdentifiable entity) + public DocumentData GetData(ContextEntity contextEntity, IIdentifiable entity) { var data = new DocumentData { diff --git a/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs index 5844166c18..9f3c7bd1a8 100644 --- a/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/IContextGraphBuilder.cs @@ -8,8 +8,8 @@ public interface IContextGraphBuilder { Link DocumentLinks { get; set; } IContextGraph Build(); - void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable; - void AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable; - void AddDbContext() where T : DbContext; + IContextGraphBuilder AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable; + IContextGraphBuilder AddResource(string pluralizedTypeName) where TResource : class, IIdentifiable; + IContextGraphBuilder AddDbContext() where T : DbContext; } } diff --git a/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs index 8fe5c65ae9..4fbc8df01b 100644 --- a/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Models; namespace JsonApiDotNetCore.Builders @@ -7,5 +8,6 @@ public interface IDocumentBuilder { Document Build(IIdentifiable entity); Documents Build(IEnumerable entities); + DocumentData GetData(ContextEntity contextEntity, IIdentifiable entity); } } \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Models/DocumentData.cs b/src/JsonApiDotNetCore/Models/DocumentData.cs index afd9c717cf..f4a3c137ae 100644 --- a/src/JsonApiDotNetCore/Models/DocumentData.cs +++ b/src/JsonApiDotNetCore/Models/DocumentData.cs @@ -1,6 +1,4 @@ -using System; using System.Collections.Generic; -using JsonApiDotNetCore.Models.Pointers; using Newtonsoft.Json; namespace JsonApiDotNetCore.Models diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs index 3004ba15ef..8ef9298027 100644 --- a/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs @@ -1,26 +1,42 @@ using System.Threading.Tasks; using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Serialization; namespace JsonApiDotNetCore.Services.Operations.Processors { + public class CreateOpProcessor : CreateOpProcessor + where T : class, IIdentifiable + { + public CreateOpProcessor( + ICreateService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder, + IContextGraph contextGraph + ) : base(service, deSerializer, documentBuilder, contextGraph) + { } + } + public class CreateOpProcessor : IOpProcessor where T : class, IIdentifiable { private readonly ICreateService _service; private readonly IJsonApiDeSerializer _deSerializer; private readonly IDocumentBuilder _documentBuilder; + private readonly IContextGraph _contextGraph; public CreateOpProcessor( ICreateService service, IJsonApiDeSerializer deSerializer, - IDocumentBuilder documentBuilder) + IDocumentBuilder documentBuilder, + IContextGraph contextGraph) { _service = service; _deSerializer = deSerializer; _documentBuilder = documentBuilder; + _contextGraph = contextGraph; } public async Task ProcessAsync(Operation operation) @@ -32,7 +48,9 @@ public async Task ProcessAsync(Operation operation) Op = OperationCode.add }; - operationResult.Data = _documentBuilder.Build(result); + operationResult.Data = _documentBuilder.GetData( + _contextGraph.GetContextEntity(operation.GetResourceTypeName()), + result); return operationResult; } diff --git a/test/UnitTests/Services/Operations/Processors/CreateOpProcessorTests.cs b/test/UnitTests/Services/Operations/Processors/CreateOpProcessorTests.cs new file mode 100644 index 0000000000..9e33af63c2 --- /dev/null +++ b/test/UnitTests/Services/Operations/Processors/CreateOpProcessorTests.cs @@ -0,0 +1,80 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Serialization; +using JsonApiDotNetCore.Services; +using JsonApiDotNetCore.Services.Operations.Processors; +using Moq; +using Xunit; + +namespace UnitTests.Services +{ + public class CreateOpProcessorTests + { + private readonly Mock> _createServiceMock; + private readonly Mock _deserializerMock; + private readonly Mock _documentBuilderMock; + + public CreateOpProcessorTests() + { + _createServiceMock = new Mock>(); + _deserializerMock = new Mock(); + _documentBuilderMock = new Mock(); + } + + [Fact] + public async Task ProcessAsync_Deserializes_And_Creates() + { + // arrange + var testResource = new TestResource { + Name = "some-name" + }; + + var data = new DocumentData { + Type = "test-resources", + Attributes = new Dictionary { + { "name", testResource.Name } + } + }; + + var operation = new Operation { + Data = data, + }; + + var contextGraph = new ContextGraphBuilder() + .AddResource("test-resources") + .Build(); + + _deserializerMock.Setup(m => m.DocumentToObject(It.IsAny())) + .Returns(testResource); + + var opProcessor = new CreateOpProcessor( + _createServiceMock.Object, + _deserializerMock.Object, + _documentBuilderMock.Object, + contextGraph + ); + + _documentBuilderMock.Setup(m => m.GetData(It.IsAny(), It.IsAny())) + .Returns(data); + + // act + var result = await opProcessor.ProcessAsync(operation); + + // assert + Assert.Equal(OperationCode.add, result.Op); + Assert.NotNull(result.Data); + Assert.Equal(testResource.Name, result.DataObject.Attributes["name"]); + _createServiceMock.Verify(m => m.CreateAsync(It.IsAny())); + } + + public class TestResource : Identifiable + { + [Attr("name")] + public string Name { get; set; } + } + } +} From 8e6a2401198ce84f2f12f8b5c8ed071a74ca9101 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sat, 26 Aug 2017 21:11:58 -0500 Subject: [PATCH 12/38] feat(content-negotiation): wire up reader and input formatter --- .../JsonApiOperationsInputFormatter.cs | 33 ++++++++++++++ .../Formatters/JsonApiOperationsReader.cs | 44 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs create mode 100644 src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs new file mode 100644 index 0000000000..61ae97ffbb --- /dev/null +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Formatters; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Primitives; + +namespace JsonApiDotNetCore.Formatters +{ + public class JsonApiOperationsInputFormatter : IInputFormatter + { + const string PROFILE_EXTENSION = "; rel=\"profile\""; + + public bool CanRead(InputFormatterContext context) + { + if (context == null) + throw new ArgumentNullException(nameof(context)); + + var contentTypeString = context.HttpContext.Request.ContentType; + + return ( + contentTypeString == "application/vnd.api+json" && + context.HttpContext.Request.Headers.TryGetValue("Link", out StringValues profileExtension) && + profileExtension == PROFILE_EXTENSION + ); + } + + public async Task ReadAsync(InputFormatterContext context) + { + var reader = context.HttpContext.RequestServices.GetService(); + return await reader.ReadAsync(context); + } + } +} diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs new file mode 100644 index 0000000000..f586d2e7e9 --- /dev/null +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs @@ -0,0 +1,44 @@ +using System; +using System.IO; +using System.Threading.Tasks; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Serialization; +using JsonApiDotNetCore.Services; +using Microsoft.AspNetCore.Mvc.Formatters; +using Microsoft.Extensions.Logging; +using Newtonsoft.Json; + +namespace JsonApiDotNetCore.Formatters +{ + public interface IJsonApiOperationsReader + { + Task ReadAsync(InputFormatterContext context); + } + + public class JsonApiOperationsReader : IJsonApiOperationsReader + { + public JsonApiOperationsReader() + { + } + + public Task ReadAsync(InputFormatterContext context) + { + if (context == null) + throw new ArgumentNullException(nameof(context)); + + var request = context.HttpContext.Request; + if (request.ContentLength == 0) + return InputFormatterResult.FailureAsync(); + + return InputFormatterResult.SuccessAsync(null); + } + + private string GetRequestBody(Stream body) + { + using (var reader = new StreamReader(body)) + { + return reader.ReadToEnd(); + } + } + } +} \ No newline at end of file From 6dca5c0e8a701d07b06629d650216119de2580f4 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 27 Aug 2017 18:09:00 -0500 Subject: [PATCH 13/38] feat(reader): deserialize operations document --- .../Formatters/JsonApiOperationsReader.cs | 17 ++++++----------- .../Models/Operations/OperationsDocument.cs | 9 +++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs index f586d2e7e9..3fc4524b9b 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs @@ -1,11 +1,8 @@ using System; using System.IO; using System.Threading.Tasks; -using JsonApiDotNetCore.Internal; -using JsonApiDotNetCore.Serialization; -using JsonApiDotNetCore.Services; +using JsonApiDotNetCore.Models.Operations; using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.Extensions.Logging; using Newtonsoft.Json; namespace JsonApiDotNetCore.Formatters @@ -17,28 +14,26 @@ public interface IJsonApiOperationsReader public class JsonApiOperationsReader : IJsonApiOperationsReader { - public JsonApiOperationsReader() - { - } - public Task ReadAsync(InputFormatterContext context) { if (context == null) throw new ArgumentNullException(nameof(context)); var request = context.HttpContext.Request; - if (request.ContentLength == 0) + if (request.ContentLength == null || request.ContentLength == 0) return InputFormatterResult.FailureAsync(); + var body = GetRequestBody(request.Body); + + var operations = JsonConvert.DeserializeObject(body); + return InputFormatterResult.SuccessAsync(null); } private string GetRequestBody(Stream body) { using (var reader = new StreamReader(body)) - { return reader.ReadToEnd(); - } } } } \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs b/src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs new file mode 100644 index 0000000000..987f9abc20 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace JsonApiDotNetCore.Models.Operations +{ + public class OperationsDocument + { + public List Operations { get; set; } + } +} From 00cbc045a45a0aa135f4b042716dddec7267399f Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Mon, 28 Aug 2017 20:01:23 -0500 Subject: [PATCH 14/38] feat(*): add controller, input formatter, and services --- JsonApiDotnetCore.sln | 15 ++++++++++++ .../Configuration/JsonApiOptions.cs | 8 +++++++ .../Controllers/BaseJsonApiController.cs | 1 - .../JsonApiOperationsController.cs | 24 +++++++++++++++++++ .../IServiceCollectionExtensions.cs | 15 ++++++++++++ .../Formatters/JsonApiInputFormatter.cs | 9 +++++-- .../JsonApiOperationsInputFormatter.cs | 22 +++++++++++++---- .../Formatters/JsonApiOperationsReader.cs | 6 ++++- .../Models/JsonApiExtension.cs | 7 ++++++ 9 files changed, 98 insertions(+), 9 deletions(-) create mode 100644 src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs create mode 100644 src/JsonApiDotNetCore/Models/JsonApiExtension.cs diff --git a/JsonApiDotnetCore.sln b/JsonApiDotnetCore.sln index b4ff89b0aa..74ea28c41a 100644 --- a/JsonApiDotnetCore.sln +++ b/JsonApiDotnetCore.sln @@ -28,6 +28,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{02 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReportsExample", "src\Examples\ReportsExample\ReportsExample.csproj", "{FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperationsExample", "src\Examples\OperationsExample\OperationsExample.csproj", "{CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -110,6 +112,18 @@ Global {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|x64.Build.0 = Release|x64 {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|x86.ActiveCfg = Release|x86 {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|x86.Build.0 = Release|x86 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x64.ActiveCfg = Debug|x64 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x64.Build.0 = Debug|x64 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x86.ActiveCfg = Debug|x86 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x86.Build.0 = Debug|x86 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|Any CPU.Build.0 = Release|Any CPU + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x64.ActiveCfg = Release|x64 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x64.Build.0 = Release|x64 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x86.ActiveCfg = Release|x86 + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -123,5 +137,6 @@ Global {6D4BD85A-A262-44C6-8572-FE3A30410BF3} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F} {026FBC6C-AF76-4568-9B87-EC73457899FD} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF} {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D} = {026FBC6C-AF76-4568-9B87-EC73457899FD} + {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D} = {026FBC6C-AF76-4568-9B87-EC73457899FD} EndGlobalSection EndGlobal diff --git a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs index 26e16b0741..be22f8af07 100644 --- a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs +++ b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using JsonApiDotNetCore.Builders; using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Serialization; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; @@ -30,6 +32,7 @@ public IContractResolver JsonContractResolver ContractResolver = new DasherizedResolver() }; internal IContextGraphBuilder ContextGraphBuilder { get; } = new ContextGraphBuilder(); + internal List EnabledExtensions { get; set; } = new List(); public void BuildContextGraph(Action builder) where TContext : DbContext { @@ -48,5 +51,10 @@ public void BuildContextGraph(Action builder) ContextGraph = ContextGraphBuilder.Build(); } + + public void EnableExtension(JsonApiExtension extension) + { + EnabledExtensions.Add(extension); + } } } diff --git a/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs b/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs index a10ea381de..8785eb2266 100644 --- a/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs +++ b/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs @@ -4,7 +4,6 @@ using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Services; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; namespace JsonApiDotNetCore.Controllers { diff --git a/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs new file mode 100644 index 0000000000..40ac76fea3 --- /dev/null +++ b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs @@ -0,0 +1,24 @@ +using System.Threading.Tasks; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Services.Operations; +using Microsoft.AspNetCore.Mvc; + +namespace JsonApiDotNetCore.Controllers +{ + public class JsonApiOperationsController : Controller + { + private readonly IOperationsProcessor _operationsProcessor; + + public JsonApiOperationsController(IOperationsProcessor operationsProcessor) + { + _operationsProcessor = operationsProcessor; + } + + [HttpPost("bulk")] + public async Task PatchAsync(OperationsDocument doc) + { + var results = await _operationsProcessor.ProcessAsync(doc.Operations); + return Ok(results); + } + } +} diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index afcc11ee8d..6cd84d397c 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -6,8 +6,10 @@ using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Internal.Generics; using JsonApiDotNetCore.Middleware; +using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Serialization; using JsonApiDotNetCore.Services; +using JsonApiDotNetCore.Services.Operations; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -91,6 +93,9 @@ public static void AddJsonApiInternals( services.AddSingleton(new DbContextOptionsBuilder().Options); } + if (jsonApiOptions.EnabledExtensions.Contains(JsonApiExtension.Operations)) + AddOperationServices(services); + services.AddScoped(); services.AddScoped(typeof(IEntityRepository<>), typeof(DefaultEntityRepository<>)); services.AddScoped(typeof(IEntityRepository<,>), typeof(DefaultEntityRepository<,>)); @@ -114,8 +119,18 @@ public static void AddJsonApiInternals( services.AddScoped(); } + private static void AddOperationServices(IServiceCollection services) + { + services.AddScoped(); + services.AddSingleton(); + services.AddSingleton(); + } + public static void SerializeAsJsonApi(this MvcOptions options, JsonApiOptions jsonApiOptions) { + if (jsonApiOptions.EnabledExtensions.Contains(JsonApiExtension.Operations)) + options.InputFormatters.Insert(0, new JsonApiOperationsInputFormatter()); + options.InputFormatters.Insert(0, new JsonApiInputFormatter()); options.OutputFormatters.Insert(0, new JsonApiOutputFormatter()); diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs b/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs index 12e57deadf..f5b822fd62 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs @@ -8,17 +8,22 @@ namespace JsonApiDotNetCore.Formatters public class JsonApiInputFormatter : IInputFormatter { public bool CanRead(InputFormatterContext context) - { + { if (context == null) throw new ArgumentNullException(nameof(context)); var contentTypeString = context.HttpContext.Request.ContentType; - return contentTypeString == "application/vnd.api+json"; + var canRead = contentTypeString == "application/vnd.api+json"; + + Console.WriteLine($">>> JsonApiInputFormatter Can Read {canRead}"); + + return canRead; } public async Task ReadAsync(InputFormatterContext context) { + Console.WriteLine($">>> JsonApiInputFormatter ReadAsync"); var reader = context.HttpContext.RequestServices.GetService(); return await reader.ReadAsync(context); } diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs index 61ae97ffbb..0f83c1f031 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs @@ -1,31 +1,43 @@ using System; +using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Primitives; +using Microsoft.Net.Http.Headers; namespace JsonApiDotNetCore.Formatters { - public class JsonApiOperationsInputFormatter : IInputFormatter + public class JsonApiOperationsInputFormatter : TextInputFormatter { const string PROFILE_EXTENSION = "; rel=\"profile\""; - public bool CanRead(InputFormatterContext context) + public JsonApiOperationsInputFormatter() + { + SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/vnd.api+json")); + SupportedEncodings.Add(Encoding.UTF8); + SupportedEncodings.Add(Encoding.Unicode); + } + + public override bool CanRead(InputFormatterContext context) { if (context == null) throw new ArgumentNullException(nameof(context)); var contentTypeString = context.HttpContext.Request.ContentType; - return ( - contentTypeString == "application/vnd.api+json" && + var canRead = ( + contentTypeString == "application/vnd.api+json" && context.HttpContext.Request.Headers.TryGetValue("Link", out StringValues profileExtension) && profileExtension == PROFILE_EXTENSION ); + Console.WriteLine($">>> JsonApiOperationsInputFormatter Can Read {canRead}"); + return canRead; } - public async Task ReadAsync(InputFormatterContext context) + public override async Task ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) { + Console.WriteLine($">>> JsonApiOperationsInputFormatter ReadAsync"); var reader = context.HttpContext.RequestServices.GetService(); return await reader.ReadAsync(context); } diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs index 3fc4524b9b..9cfc4c177b 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Threading.Tasks; +using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Models.Operations; using Microsoft.AspNetCore.Mvc.Formatters; using Newtonsoft.Json; @@ -27,7 +28,10 @@ public Task ReadAsync(InputFormatterContext context) var operations = JsonConvert.DeserializeObject(body); - return InputFormatterResult.SuccessAsync(null); + if(operations == null) + throw new JsonApiException(400, "Failed to deserialize operations request."); + + return InputFormatterResult.SuccessAsync(operations); } private string GetRequestBody(Stream body) diff --git a/src/JsonApiDotNetCore/Models/JsonApiExtension.cs b/src/JsonApiDotNetCore/Models/JsonApiExtension.cs new file mode 100644 index 0000000000..7d3b0c87ea --- /dev/null +++ b/src/JsonApiDotNetCore/Models/JsonApiExtension.cs @@ -0,0 +1,7 @@ +namespace JsonApiDotNetCore.Models +{ + public enum JsonApiExtension + { + Operations = 0 + } +} From bbc4dea0b17e207ee0c65f882423dfae9c90035a Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Mon, 28 Aug 2017 20:01:39 -0500 Subject: [PATCH 15/38] feat(examples): add operations example --- src/Examples/OperationsExample/.gitignore | 236 ++++++++++++++++++ .../Controllers/OperationsController.cs | 14 ++ .../OperationsExample/Data/AppDbContext.cs | 14 ++ .../20170827234334_AddArticles.Designer.cs | 33 +++ .../Migrations/20170827234334_AddArticles.cs | 32 +++ .../Migrations/AppDbContextModelSnapshot.cs | 32 +++ .../OperationsExample/Models/Article.cs | 10 + .../OperationsExample.csproj | 33 +++ src/Examples/OperationsExample/Program.cs | 26 ++ src/Examples/OperationsExample/Startup.cs | 66 +++++ .../OperationsExample/appsettings.json | 13 + 11 files changed, 509 insertions(+) create mode 100644 src/Examples/OperationsExample/.gitignore create mode 100644 src/Examples/OperationsExample/Controllers/OperationsController.cs create mode 100644 src/Examples/OperationsExample/Data/AppDbContext.cs create mode 100755 src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.Designer.cs create mode 100755 src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.cs create mode 100755 src/Examples/OperationsExample/Migrations/AppDbContextModelSnapshot.cs create mode 100644 src/Examples/OperationsExample/Models/Article.cs create mode 100644 src/Examples/OperationsExample/OperationsExample.csproj create mode 100644 src/Examples/OperationsExample/Program.cs create mode 100644 src/Examples/OperationsExample/Startup.cs create mode 100644 src/Examples/OperationsExample/appsettings.json diff --git a/src/Examples/OperationsExample/.gitignore b/src/Examples/OperationsExample/.gitignore new file mode 100644 index 0000000000..0f552f400b --- /dev/null +++ b/src/Examples/OperationsExample/.gitignore @@ -0,0 +1,236 @@ +_data/ + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ diff --git a/src/Examples/OperationsExample/Controllers/OperationsController.cs b/src/Examples/OperationsExample/Controllers/OperationsController.cs new file mode 100644 index 0000000000..d0ceaab71e --- /dev/null +++ b/src/Examples/OperationsExample/Controllers/OperationsController.cs @@ -0,0 +1,14 @@ +using JsonApiDotNetCore.Controllers; +using JsonApiDotNetCore.Services.Operations; +using Microsoft.AspNetCore.Mvc; + +namespace OperationsExample.Controllers +{ + [Route("api/[controller]")] + public class OperationsController : JsonApiOperationsController + { + public OperationsController(IOperationsProcessor processor) + : base(processor) + { } + } +} diff --git a/src/Examples/OperationsExample/Data/AppDbContext.cs b/src/Examples/OperationsExample/Data/AppDbContext.cs new file mode 100644 index 0000000000..d00bfe4765 --- /dev/null +++ b/src/Examples/OperationsExample/Data/AppDbContext.cs @@ -0,0 +1,14 @@ +using Microsoft.EntityFrameworkCore; +using OperationsExample.Models; + +namespace OperationsExample.Data +{ + public class AppDbContext : DbContext + { + public AppDbContext(DbContextOptions options) + : base(options) + { } + + public DbSet
Articles { get; set; } + } +} diff --git a/src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.Designer.cs b/src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.Designer.cs new file mode 100755 index 0000000000..10f16d49cd --- /dev/null +++ b/src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.Designer.cs @@ -0,0 +1,33 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using OperationsExample.Data; + +namespace OperationsExample.Migrations +{ + [DbContext(typeof(AppDbContext))] + [Migration("20170827234334_AddArticles")] + partial class AddArticles + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) + .HasAnnotation("ProductVersion", "1.1.2"); + + modelBuilder.Entity("OperationsExample.Models.Article", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("Articles"); + }); + } + } +} diff --git a/src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.cs b/src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.cs new file mode 100755 index 0000000000..308e6f78f5 --- /dev/null +++ b/src/Examples/OperationsExample/Migrations/20170827234334_AddArticles.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Metadata; + +namespace OperationsExample.Migrations +{ + public partial class AddArticles : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Articles", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), + Name = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Articles", x => x.Id); + }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Articles"); + } + } +} diff --git a/src/Examples/OperationsExample/Migrations/AppDbContextModelSnapshot.cs b/src/Examples/OperationsExample/Migrations/AppDbContextModelSnapshot.cs new file mode 100755 index 0000000000..547bbbf2cf --- /dev/null +++ b/src/Examples/OperationsExample/Migrations/AppDbContextModelSnapshot.cs @@ -0,0 +1,32 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using OperationsExample.Data; + +namespace OperationsExample.Migrations +{ + [DbContext(typeof(AppDbContext))] + partial class AppDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) + .HasAnnotation("ProductVersion", "1.1.2"); + + modelBuilder.Entity("OperationsExample.Models.Article", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("Articles"); + }); + } + } +} diff --git a/src/Examples/OperationsExample/Models/Article.cs b/src/Examples/OperationsExample/Models/Article.cs new file mode 100644 index 0000000000..fc4b5d6647 --- /dev/null +++ b/src/Examples/OperationsExample/Models/Article.cs @@ -0,0 +1,10 @@ +using JsonApiDotNetCore.Models; + +namespace OperationsExample.Models +{ + public class Article : Identifiable + { + [Attr("name")] + public string Name { get; set; } + } +} diff --git a/src/Examples/OperationsExample/OperationsExample.csproj b/src/Examples/OperationsExample/OperationsExample.csproj new file mode 100644 index 0000000000..e033989925 --- /dev/null +++ b/src/Examples/OperationsExample/OperationsExample.csproj @@ -0,0 +1,33 @@ + + + + netcoreapp1.0 + true + OperationsExample + Exe + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Examples/OperationsExample/Program.cs b/src/Examples/OperationsExample/Program.cs new file mode 100644 index 0000000000..b528f47d15 --- /dev/null +++ b/src/Examples/OperationsExample/Program.cs @@ -0,0 +1,26 @@ +using System.IO; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; + +namespace OperationsExample +{ + public class Program + { + public static void Main(string[] args) + { + var config = new ConfigurationBuilder() + .AddCommandLine(args) + .AddEnvironmentVariables(prefix: "ASPNETCORE_") + .Build(); + + var host = new WebHostBuilder() + .UseConfiguration(config) + .UseKestrel() + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseStartup() + .Build(); + + host.Run(); + } + } +} diff --git a/src/Examples/OperationsExample/Startup.cs b/src/Examples/OperationsExample/Startup.cs new file mode 100644 index 0000000000..40e9f5295a --- /dev/null +++ b/src/Examples/OperationsExample/Startup.cs @@ -0,0 +1,66 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.EntityFrameworkCore; +using JsonApiDotNetCore.Extensions; +using System; +using OperationsExample.Data; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Formatters; + +namespace OperationsExample +{ + public class Startup + { + public readonly IConfiguration Config; + + public Startup(IHostingEnvironment env) + { + var builder = new ConfigurationBuilder() + .SetBasePath(env.ContentRootPath) + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) + .AddEnvironmentVariables(); + + Config = builder.Build(); + } + + public virtual IServiceProvider ConfigureServices(IServiceCollection services) + { + var loggerFactory = new LoggerFactory(); + loggerFactory + .AddConsole(LogLevel.Trace); + services.AddSingleton(loggerFactory); + + services.AddDbContext(options => + { + options.UseNpgsql(GetDbConnectionString()); + }, ServiceLifetime .Transient); + + services.AddJsonApi(opt => opt.EnableExtension(JsonApiExtension.Operations)); + + services.AddMvc().AddMvcOptions(options => { + options.InputFormatters.Clear(); + options.InputFormatters.Insert(0, new JsonApiOperationsInputFormatter()); + }); + + return services.BuildServiceProvider(); + } + + public virtual void Configure( + IApplicationBuilder app, + IHostingEnvironment env, + ILoggerFactory loggerFactory, + AppDbContext context) + { + context.Database.EnsureCreated(); + + loggerFactory.AddConsole(Config.GetSection("Logging")); + loggerFactory.AddDebug(); + app.UseJsonApi(); + } + + public string GetDbConnectionString() => Config["Data:DefaultConnection"]; + } +} \ No newline at end of file diff --git a/src/Examples/OperationsExample/appsettings.json b/src/Examples/OperationsExample/appsettings.json new file mode 100644 index 0000000000..c1061281cc --- /dev/null +++ b/src/Examples/OperationsExample/appsettings.json @@ -0,0 +1,13 @@ +{ + "Data": { + "DefaultConnection": "Host=localhost;Port=5432;Database=OperationsExample;User ID=postgres;Password=password" + }, + "Logging": { + "IncludeScopes": false, + "LogLevel": { + "Default": "Trace", + "System": "Trace", + "Microsoft": "Trace" + } + } +} From 5f3370ec4bc4f5afe55e03835090d6bd7740eb2e Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Tue, 12 Sep 2017 06:30:16 -0500 Subject: [PATCH 16/38] fix(controller): use HTTP PATCH --- .vscode/launch.json | 10 ++++++++++ .../Controllers/OperationsController.cs | 2 +- .../Controllers/JsonApiOperationsController.cs | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b26b008078..1da452f8e1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,16 @@ { "version": "0.2.0", "configurations": [ + { + "name": "OperationsExample", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceRoot}/src/Examples/OperationsExample/bin/Debug/netcoreapp1.0/OperationsExample.dll", + "args": [], + "cwd": "${workspaceRoot}/src/Examples/OperationsExample", + "stopAtEntry": false + }, { "name": ".NET Core Attach", "type": "coreclr", diff --git a/src/Examples/OperationsExample/Controllers/OperationsController.cs b/src/Examples/OperationsExample/Controllers/OperationsController.cs index d0ceaab71e..6e56791f9c 100644 --- a/src/Examples/OperationsExample/Controllers/OperationsController.cs +++ b/src/Examples/OperationsExample/Controllers/OperationsController.cs @@ -4,7 +4,7 @@ namespace OperationsExample.Controllers { - [Route("api/[controller]")] + [Route("api/bulk")] public class OperationsController : JsonApiOperationsController { public OperationsController(IOperationsProcessor processor) diff --git a/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs index 40ac76fea3..639468450d 100644 --- a/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs +++ b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs @@ -14,7 +14,7 @@ public JsonApiOperationsController(IOperationsProcessor operationsProcessor) _operationsProcessor = operationsProcessor; } - [HttpPost("bulk")] + [HttpPatch] public async Task PatchAsync(OperationsDocument doc) { var results = await _operationsProcessor.ProcessAsync(doc.Operations); From c0e4e6cc7325986cd3e5bc5a13775a14d60e31c4 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Sep 2017 07:25:04 -0500 Subject: [PATCH 17/38] fix(inputFormatters): needed FromBody param attribute --- .vscode/tasks.json | 38 +++++++++---------- src/Examples/OperationsExample/Startup.cs | 8 +--- .../JsonApiOperationsController.cs | 2 +- .../IServiceCollectionExtensions.cs | 5 ++- .../Formatters/JsonApiInputFormatter.cs | 5 +-- .../JsonApiOperationsInputFormatter.cs | 18 ++------- 6 files changed, 29 insertions(+), 47 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 725d8335be..3906009211 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,20 +1,20 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "0.1.0", - "command": "dotnet", - "isShellCommand": true, - "args": [], - "options": { - "cwd": "${workspaceRoot}/src/Examples/JsonApiDotNetCoreExample" - }, - "tasks": [ - { - "taskName": "build", - "args": [ ], - "isBuildCommand": true, - "showOutput": "silent", - "problemMatcher": "$msCompile" - } - ] -} \ No newline at end of file + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "0.1.0", + "command": "dotnet", + "isShellCommand": true, + "args": [], + "options": { + "cwd": "${workspaceRoot}" + }, + "tasks": [ + { + "taskName": "build", + "args": [], + "isBuildCommand": true, + "showOutput": "silent", + "problemMatcher": "$msCompile" + } + ] +} diff --git a/src/Examples/OperationsExample/Startup.cs b/src/Examples/OperationsExample/Startup.cs index 40e9f5295a..1ffedf9116 100644 --- a/src/Examples/OperationsExample/Startup.cs +++ b/src/Examples/OperationsExample/Startup.cs @@ -8,7 +8,6 @@ using System; using OperationsExample.Data; using JsonApiDotNetCore.Models; -using JsonApiDotNetCore.Formatters; namespace OperationsExample { @@ -36,15 +35,10 @@ public virtual IServiceProvider ConfigureServices(IServiceCollection services) services.AddDbContext(options => { options.UseNpgsql(GetDbConnectionString()); - }, ServiceLifetime .Transient); + }, ServiceLifetime.Transient); services.AddJsonApi(opt => opt.EnableExtension(JsonApiExtension.Operations)); - services.AddMvc().AddMvcOptions(options => { - options.InputFormatters.Clear(); - options.InputFormatters.Insert(0, new JsonApiOperationsInputFormatter()); - }); - return services.BuildServiceProvider(); } diff --git a/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs index 639468450d..3990f7b85d 100644 --- a/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs +++ b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs @@ -15,7 +15,7 @@ public JsonApiOperationsController(IOperationsProcessor operationsProcessor) } [HttpPatch] - public async Task PatchAsync(OperationsDocument doc) + public async Task PatchAsync([FromBody] OperationsDocument doc) { var results = await _operationsProcessor.ProcessAsync(doc.Operations); return Ok(results); diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index 6cd84d397c..12e86d09ea 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -112,6 +112,7 @@ public static void AddJsonApiInternals( services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(typeof(GenericProcessor<>)); services.AddScoped(); @@ -128,11 +129,11 @@ private static void AddOperationServices(IServiceCollection services) public static void SerializeAsJsonApi(this MvcOptions options, JsonApiOptions jsonApiOptions) { + options.InputFormatters.Insert(0, new JsonApiInputFormatter()); + if (jsonApiOptions.EnabledExtensions.Contains(JsonApiExtension.Operations)) options.InputFormatters.Insert(0, new JsonApiOperationsInputFormatter()); - options.InputFormatters.Insert(0, new JsonApiInputFormatter()); - options.OutputFormatters.Insert(0, new JsonApiOutputFormatter()); options.Conventions.Insert(0, new DasherizedRoutingConvention(jsonApiOptions.Namespace)); diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs b/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs index f5b822fd62..b7f5ae7f76 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiInputFormatter.cs @@ -8,7 +8,7 @@ namespace JsonApiDotNetCore.Formatters public class JsonApiInputFormatter : IInputFormatter { public bool CanRead(InputFormatterContext context) - { + { if (context == null) throw new ArgumentNullException(nameof(context)); @@ -16,14 +16,11 @@ public bool CanRead(InputFormatterContext context) var canRead = contentTypeString == "application/vnd.api+json"; - Console.WriteLine($">>> JsonApiInputFormatter Can Read {canRead}"); - return canRead; } public async Task ReadAsync(InputFormatterContext context) { - Console.WriteLine($">>> JsonApiInputFormatter ReadAsync"); var reader = context.HttpContext.RequestServices.GetService(); return await reader.ReadAsync(context); } diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs index 0f83c1f031..de5ed86bf1 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs @@ -1,25 +1,16 @@ using System; -using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Primitives; -using Microsoft.Net.Http.Headers; namespace JsonApiDotNetCore.Formatters { - public class JsonApiOperationsInputFormatter : TextInputFormatter + public class JsonApiOperationsInputFormatter : IInputFormatter { const string PROFILE_EXTENSION = "; rel=\"profile\""; - public JsonApiOperationsInputFormatter() - { - SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/vnd.api+json")); - SupportedEncodings.Add(Encoding.UTF8); - SupportedEncodings.Add(Encoding.Unicode); - } - - public override bool CanRead(InputFormatterContext context) + public bool CanRead(InputFormatterContext context) { if (context == null) throw new ArgumentNullException(nameof(context)); @@ -31,13 +22,12 @@ public override bool CanRead(InputFormatterContext context) context.HttpContext.Request.Headers.TryGetValue("Link", out StringValues profileExtension) && profileExtension == PROFILE_EXTENSION ); - Console.WriteLine($">>> JsonApiOperationsInputFormatter Can Read {canRead}"); + return canRead; } - public override async Task ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) + public async Task ReadAsync(InputFormatterContext context) { - Console.WriteLine($">>> JsonApiOperationsInputFormatter ReadAsync"); var reader = context.HttpContext.RequestServices.GetService(); return await reader.ReadAsync(context); } From a66534bb25c1ce09f8046466a60632a5d3daa1ca Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 14 Sep 2017 21:54:11 -0500 Subject: [PATCH 18/38] chore(*): replace Any with Count --- docs/Usage.md | 2 +- src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs | 2 +- .../Extensions/IQueryableExtensions.cs | 10 +++++----- src/JsonApiDotNetCore/Services/JsonApiContext.cs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/Usage.md b/docs/Usage.md index 33db2d787f..07ac168a21 100644 --- a/docs/Usage.md +++ b/docs/Usage.md @@ -117,7 +117,7 @@ public void Configure( AppDbContext context) { context.Database.EnsureCreated(); - if(context.People.Any() == false) + if(context.People.Count == 0) { context.People.Add(new Person { Name = "John Doe" diff --git a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs index 66804abee5..742a32e305 100644 --- a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs +++ b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs @@ -62,7 +62,7 @@ public DefaultEntityRepository( public virtual IQueryable Get() { - if (_jsonApiContext.QuerySet?.Fields != null && _jsonApiContext.QuerySet.Fields.Any()) + if (_jsonApiContext.QuerySet?.Fields != null && _jsonApiContext.QuerySet.Fields.Count > 0) return _dbSet.Select(_jsonApiContext.QuerySet?.Fields); return _dbSet; diff --git a/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs b/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs index c40d61b517..9713b6ddbf 100644 --- a/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IQueryableExtensions.cs @@ -13,15 +13,15 @@ public static class IQueryableExtensions { public static IOrderedQueryable Sort(this IQueryable source, SortQuery sortQuery) { - return sortQuery.Direction == SortDirection.Descending - ? source.OrderByDescending(sortQuery.SortedAttribute.InternalAttributeName) + return sortQuery.Direction == SortDirection.Descending + ? source.OrderByDescending(sortQuery.SortedAttribute.InternalAttributeName) : source.OrderBy(sortQuery.SortedAttribute.InternalAttributeName); } public static IOrderedQueryable Sort(this IOrderedQueryable source, SortQuery sortQuery) { - return sortQuery.Direction == SortDirection.Descending - ? source.ThenByDescending(sortQuery.SortedAttribute.InternalAttributeName) + return sortQuery.Direction == SortDirection.Descending + ? source.ThenByDescending(sortQuery.SortedAttribute.InternalAttributeName) : source.ThenBy(sortQuery.SortedAttribute.InternalAttributeName); } @@ -179,7 +179,7 @@ private static Expression GetFilterExpressionLambda(Expression left, Expression public static IQueryable Select(this IQueryable source, List columns) { - if (columns == null || columns.Any() == false) + if (columns == null || columns.Count == 0) return source; var sourceType = source.ElementType; diff --git a/src/JsonApiDotNetCore/Services/JsonApiContext.cs b/src/JsonApiDotNetCore/Services/JsonApiContext.cs index a93d76acdc..85978c66f6 100644 --- a/src/JsonApiDotNetCore/Services/JsonApiContext.cs +++ b/src/JsonApiDotNetCore/Services/JsonApiContext.cs @@ -66,7 +66,7 @@ public IJsonApiContext ApplyContext(object controller) var context = _httpContextAccessor.HttpContext; var path = context.Request.Path.Value.Split('/'); - if (context.Request.Query.Any()) + if (context.Request.Query.Count > 0) { QuerySet = _queryParser.Parse(context.Request.Query); IncludedRelationships = QuerySet.IncludedRelationships; From 2a3cdc45c1da63c4b202158534299a1792c8e6ee Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 14 Sep 2017 23:47:49 -0500 Subject: [PATCH 19/38] fix(CreateOpProcessor): issues around service location also cleans up some styling --- .../Builders/ContextGraphBuilder.cs | 44 +++++++++++-------- .../Data/DefaultEntityRepository.cs | 2 +- .../IServiceCollectionExtensions.cs | 6 +++ .../Internal/Generics/GenericProcessor.cs | 13 +++++- .../Generics/GenericProcessorFactory.cs | 37 ++++++++++++++-- .../Internal/Generics/IGenericProcessor.cs | 12 ----- .../Generics/IGenericProcessorFactory.cs | 15 ------- src/JsonApiDotNetCore/Models/DocumentBase.cs | 22 ++-------- src/JsonApiDotNetCore/Models/DocumentData.cs | 2 +- .../Models/Operations/Operation.cs | 28 ++++++++---- .../Serialization/JsonApiDeSerializer.cs | 2 +- .../Services/Operations/IOpProcessor.cs | 5 --- .../Operations/OperationProcessorResolver.cs | 9 ++-- .../Operations/OperationsProcessor.cs | 8 ++-- .../Processors/CreateOpProcessor.cs | 17 +++++-- 15 files changed, 126 insertions(+), 96 deletions(-) delete mode 100644 src/JsonApiDotNetCore/Internal/Generics/IGenericProcessor.cs delete mode 100644 src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs diff --git a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs index efbc0535e1..e35cc916d2 100644 --- a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs @@ -35,20 +35,22 @@ public IContextGraphBuilder AddResource(string pluralizedTypeNam { var entityType = typeof(TResource); - VerifyEntityIsNotAlreadyDefined(entityType); + AssertEntityIsNotAlreadyDefined(entityType); - _entities.Add(new ContextEntity - { - EntityName = pluralizedTypeName, - EntityType = entityType, - IdentityType = typeof(TId), - Attributes = GetAttributes(entityType), - Relationships = GetRelationships(entityType) - }); + _entities.Add(GetEntity(pluralizedTypeName, entityType, typeof(TId))); return this; } + private ContextEntity GetEntity(string pluralizedTypeName, Type entityType, Type idType) => new ContextEntity + { + EntityName = pluralizedTypeName, + EntityType = entityType, + IdentityType = idType, + Attributes = GetAttributes(entityType), + Relationships = GetRelationships(entityType) + }; + private Link GetLinkFlags(Type entityType) { var attribute = (LinksAttribute)entityType.GetTypeInfo().GetCustomAttribute(typeof(LinksAttribute)); @@ -116,15 +118,9 @@ public IContextGraphBuilder AddDbContext() where T : DbContext { var entityType = dbSetType.GetGenericArguments()[0]; - VerifyEntityIsNotAlreadyDefined(entityType); + AssertEntityIsNotAlreadyDefined(entityType); - _entities.Add(new ContextEntity - { - EntityName = GetResourceName(property), - EntityType = entityType, - Attributes = GetAttributes(entityType), - Relationships = GetRelationships(entityType) - }); + _entities.Add(GetEntity(GetResourceName(property), entityType, GetIdType(entityType))); } } @@ -140,7 +136,19 @@ private string GetResourceName(PropertyInfo property) return ((ResourceAttribute)resourceAttribute).ResourceName; } - private void VerifyEntityIsNotAlreadyDefined(Type entityType) + private Type GetIdType(Type resourceType) + { + var interfaces = resourceType.GetInterfaces(); + foreach (var type in interfaces) + { + if (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(IIdentifiable<>)) + return type.GetGenericArguments()[0]; + } + + throw new ArgumentException("Type does not implement 'IIdentifiable'", nameof(resourceType)); + } + + private void AssertEntityIsNotAlreadyDefined(Type entityType) { if (_entities.Any(e => e.EntityType == entityType)) throw new InvalidOperationException($"Cannot add entity type {entityType} to context graph, there is already an entity of that type configured."); diff --git a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs index 742a32e305..e8aefb5ca9 100644 --- a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs +++ b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs @@ -137,7 +137,7 @@ public virtual async Task UpdateAsync(TId id, TEntity entity) public async Task UpdateRelationshipsAsync(object parent, RelationshipAttribute relationship, IEnumerable relationshipIds) { - var genericProcessor = _genericProcessorFactory.GetProcessor(relationship.Type); + var genericProcessor = _genericProcessorFactory.GetProcessor(typeof(GenericProcessor<>), relationship.Type); await genericProcessor.UpdateRelationshipsAsync(parent, relationship, relationshipIds); } diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index 12e86d09ea..ab297252f9 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -10,6 +10,7 @@ using JsonApiDotNetCore.Serialization; using JsonApiDotNetCore.Services; using JsonApiDotNetCore.Services.Operations; +using JsonApiDotNetCore.Services.Operations.Processors; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -99,6 +100,8 @@ public static void AddJsonApiInternals( services.AddScoped(); services.AddScoped(typeof(IEntityRepository<>), typeof(DefaultEntityRepository<>)); services.AddScoped(typeof(IEntityRepository<,>), typeof(DefaultEntityRepository<,>)); + services.AddScoped(typeof(ICreateService<>), typeof(EntityResourceService<>)); + services.AddScoped(typeof(ICreateService<,>), typeof(EntityResourceService<,>)); services.AddScoped(typeof(IResourceService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IResourceService<,>), typeof(EntityResourceService<,>)); services.AddSingleton(jsonApiOptions); @@ -115,6 +118,7 @@ public static void AddJsonApiInternals( services.AddScoped(); services.AddScoped(); services.AddScoped(typeof(GenericProcessor<>)); + services.AddScoped(typeof(GenericProcessor<,>)); services.AddScoped(); services.AddScoped(); services.AddScoped(); @@ -123,6 +127,8 @@ public static void AddJsonApiInternals( private static void AddOperationServices(IServiceCollection services) { services.AddScoped(); + services.AddScoped(typeof(ICreateOpProcessor<>), typeof(CreateOpProcessor<>)); + services.AddScoped(typeof(ICreateOpProcessor<,>), typeof(CreateOpProcessor<,>)); services.AddSingleton(); services.AddSingleton(); } diff --git a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs index ce76b47dae..74bc551ece 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs @@ -7,7 +7,18 @@ namespace JsonApiDotNetCore.Internal.Generics { - public class GenericProcessor : IGenericProcessor where T : class, IIdentifiable + public interface IGenericProcessor + { + Task UpdateRelationshipsAsync(object parent, RelationshipAttribute relationship, IEnumerable relationshipIds); + void SetRelationships(object parent, RelationshipAttribute relationship, IEnumerable relationshipIds); + } + + public class GenericProcessor : GenericProcessor where T : class, IIdentifiable + { + public GenericProcessor(DbContext context) : base(context) { } + } + + public class GenericProcessor : IGenericProcessor where T : class, IIdentifiable { private readonly DbContext _context; public GenericProcessor(DbContext context) diff --git a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs index 0918da40d1..3f88010e0a 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs @@ -2,6 +2,30 @@ namespace JsonApiDotNetCore.Internal.Generics { + /// + /// Used to generate a generic operations processor when the types + /// are not known until runtime. The typical use case would be for + /// accessing relationship data or resolving operations processors. + /// + public interface IGenericProcessorFactory + { + /// + /// Constructs the generic type and locates the service, then casts to TInterface + /// + /// + /// GetProcessor<IGenericProcessor>(typeof(GenericProcessor<>), typeof(TResource)); + /// + TInterface GetProcessor(Type openGenericType, Type resourceType); + + /// + /// Constructs the generic type and locates the service, then casts to TInterface + /// + /// + /// GetProcessor<IGenericProcessor>(typeof(GenericProcessor<,>), typeof(TResource), typeof(TId)); + /// + TInterface GetProcessor(Type openGenericType, Type resourceType, Type keyType); + } + public class GenericProcessorFactory : IGenericProcessorFactory { private readonly IServiceProvider _serviceProvider; @@ -11,10 +35,17 @@ public GenericProcessorFactory(IServiceProvider serviceProvider) _serviceProvider = serviceProvider; } - public TInterface GetProcessor(Type[] types) + public TInterface GetProcessor(Type openGenericType, Type resourceType) + => _getProcessor(openGenericType, resourceType); + + public TInterface GetProcessor(Type openGenericType, Type resourceType, Type keyType) + => _getProcessor(openGenericType, resourceType, keyType); + + private TInterface _getProcessor(Type openGenericType, params Type[] types) { - var processorType = typeof(GenericProcessor<>).MakeGenericType(types); - return (TInterface)_serviceProvider.GetService(processorType); + var concreteType = openGenericType.MakeGenericType(types); + + return (TInterface)_serviceProvider.GetService(concreteType); } } } diff --git a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessor.cs b/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessor.cs deleted file mode 100644 index d05e47cb6c..0000000000 --- a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using JsonApiDotNetCore.Models; - -namespace JsonApiDotNetCore.Internal.Generics -{ - public interface IGenericProcessor - { - Task UpdateRelationshipsAsync(object parent, RelationshipAttribute relationship, IEnumerable relationshipIds); - void SetRelationships(object parent, RelationshipAttribute relationship, IEnumerable relationshipIds); - } -} diff --git a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs b/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs deleted file mode 100644 index 39df292e14..0000000000 --- a/src/JsonApiDotNetCore/Internal/Generics/IGenericProcessorFactory.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace JsonApiDotNetCore.Internal.Generics -{ - /// - /// Used to generate a generic operations processor when the types - /// are not know until runtime. The typical use case would be for - /// accessing relationship data.be for - /// accessing relationship data. - /// - public interface IGenericProcessorFactory - { - TInterface GetProcessor(params Type[] types); - } -} diff --git a/src/JsonApiDotNetCore/Models/DocumentBase.cs b/src/JsonApiDotNetCore/Models/DocumentBase.cs index 1cb31595ec..eb38f9582d 100644 --- a/src/JsonApiDotNetCore/Models/DocumentBase.cs +++ b/src/JsonApiDotNetCore/Models/DocumentBase.cs @@ -5,29 +5,13 @@ namespace JsonApiDotNetCore.Models { public class DocumentBase { - [JsonProperty("links")] + [JsonProperty("links", NullValueHandling = NullValueHandling.Ignore)] public RootLinks Links { get; set; } - [JsonProperty("included")] + [JsonProperty("included", NullValueHandling = NullValueHandling.Ignore)] public List Included { get; set; } - [JsonProperty("meta")] + [JsonProperty("meta", NullValueHandling = NullValueHandling.Ignore)] public Dictionary Meta { get; set; } - - // http://www.newtonsoft.com/json/help/html/ConditionalProperties.htm - public bool ShouldSerializeIncluded() - { - return (Included != null); - } - - public bool ShouldSerializeMeta() - { - return (Meta != null); - } - - public bool ShouldSerializeLinks() - { - return (Links != null); - } } } diff --git a/src/JsonApiDotNetCore/Models/DocumentData.cs b/src/JsonApiDotNetCore/Models/DocumentData.cs index f4a3c137ae..7b5bdadd5b 100644 --- a/src/JsonApiDotNetCore/Models/DocumentData.cs +++ b/src/JsonApiDotNetCore/Models/DocumentData.cs @@ -14,7 +14,7 @@ public class DocumentData [JsonProperty("attributes")] public Dictionary Attributes { get; set; } - [JsonProperty("relationships")] + [JsonProperty("relationships", NullValueHandling = NullValueHandling.Ignore)] public Dictionary Relationships { get; set; } } } \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Models/Operations/Operation.cs b/src/JsonApiDotNetCore/Models/Operations/Operation.cs index 1493142b9f..38c544eabc 100644 --- a/src/JsonApiDotNetCore/Models/Operations/Operation.cs +++ b/src/JsonApiDotNetCore/Models/Operations/Operation.cs @@ -1,18 +1,19 @@ using System.Collections.Generic; using Newtonsoft.Json; +using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; namespace JsonApiDotNetCore.Models.Operations { public class Operation : DocumentBase { - [JsonProperty("op")] + [JsonProperty("op"), JsonConverter(typeof(StringEnumConverter))] public OperationCode Op { get; set; } - [JsonProperty("ref")] + [JsonProperty("ref", NullValueHandling = NullValueHandling.Ignore)] public ResourceReference Ref { get; set; } - [JsonProperty("params")] + [JsonProperty("params", NullValueHandling = NullValueHandling.Ignore)] public Params Params { get; set; } [JsonProperty("data")] @@ -28,32 +29,41 @@ public object Data private void SetData(object data) { - if (data is JArray jArray) { + if (data is JArray jArray) + { DataIsList = true; DataList = jArray.ToObject>(); } - else if (data is List dataList) { + else if (data is List dataList) + { DataIsList = true; DataList = dataList; } - else if (data is JObject jObject) { + else if (data is JObject jObject) + { DataObject = jObject.ToObject(); } - else if (data is DocumentData dataObject) { + else if (data is DocumentData dataObject) + { DataObject = dataObject; } } + [JsonIgnore] public bool DataIsList { get; private set; } + + [JsonIgnore] public List DataList { get; private set; } + + [JsonIgnore] public DocumentData DataObject { get; private set; } public string GetResourceTypeName() { - if(Ref != null) + if (Ref != null) return Ref.Type?.ToString(); - if(DataIsList) + if (DataIsList) return DataList[0].Type?.ToString(); return DataObject.Type?.ToString(); diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index a5168f6185..05394fe551 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -210,7 +210,7 @@ private object SetHasManyRelationship(object entity, if (data == null) return entity; - var genericProcessor = _genericProcessorFactory.GetProcessor(attr.Type); + var genericProcessor = _genericProcessorFactory.GetProcessor(typeof(GenericProcessor<>), attr.Type); var ids = relationshipData.ManyData.Select(r => r["id"].ToString()); genericProcessor.SetRelationships(entity, attr, ids); } diff --git a/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs index 67cd0896ec..0a2d30397c 100644 --- a/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/IOpProcessor.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; namespace JsonApiDotNetCore.Services.Operations @@ -8,8 +7,4 @@ public interface IOpProcessor { Task ProcessAsync(Operation operation); } - - public interface IOpProcessor : IOpProcessor - where T : class, IIdentifiable - { } } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs index b56eb11bd6..64261af1c7 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs @@ -1,6 +1,7 @@ using System.Collections.Concurrent; using JsonApiDotNetCore.Internal.Generics; using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Services.Operations.Processors; namespace JsonApiDotNetCore.Services.Operations { @@ -33,10 +34,12 @@ public IOpProcessor LocateCreateService(Operation operation) return cachedProcessor; var contextEntity = _context.ContextGraph.GetContextEntity(resource); - var processor = _processorFactory.GetProcessor(contextEntity.EntityType, contextEntity.IdentityType); - + var processor = _processorFactory.GetProcessor( + typeof(ICreateOpProcessor<,>), contextEntity.EntityType, contextEntity.IdentityType + ); + _cachedProcessors[resource] = processor; - + return processor; } } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index 9449564f22..75e013c8c8 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -18,12 +18,12 @@ public OperationsProcessor(IOperationProcessorResolver processorResolver) { _processorResolver = processorResolver; } - + public async Task> ProcessAsync(List inputOps) { var outputOps = new List(); - foreach(var op in inputOps) + foreach (var op in inputOps) { // TODO: parse pointers: // locate all objects within the document and replace them @@ -33,8 +33,8 @@ public async Task> ProcessAsync(List inputOps) var processor = _processorResolver.LocateCreateService(op); var resultOp = await processor.ProcessAsync(op); - - if(resultOp != null) + + if (resultOp != null) outputOps.Add(resultOp); } diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs index 8ef9298027..251b81a5d6 100644 --- a/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/CreateOpProcessor.cs @@ -7,6 +7,14 @@ namespace JsonApiDotNetCore.Services.Operations.Processors { + public interface ICreateOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + + public interface ICreateOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + public class CreateOpProcessor : CreateOpProcessor where T : class, IIdentifiable { @@ -19,7 +27,7 @@ IContextGraph contextGraph { } } - public class CreateOpProcessor : IOpProcessor + public class CreateOpProcessor : ICreateOpProcessor where T : class, IIdentifiable { private readonly ICreateService _service; @@ -44,12 +52,13 @@ public async Task ProcessAsync(Operation operation) var model = (T)_deSerializer.DocumentToObject(operation.DataObject); var result = await _service.CreateAsync(model); - var operationResult = new Operation { + var operationResult = new Operation + { Op = OperationCode.add }; - + operationResult.Data = _documentBuilder.GetData( - _contextGraph.GetContextEntity(operation.GetResourceTypeName()), + _contextGraph.GetContextEntity(operation.GetResourceTypeName()), result); return operationResult; From 5c559737af143df9b4e41a778ec7a71ab3d7502d Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 14 Sep 2017 23:48:44 -0500 Subject: [PATCH 20/38] fix(DocumentBuilder): duplicate included entities use string.Equals over reference equality check --- .../Builders/DocumentBuilder.cs | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs index c6439efbc8..775800434f 100644 --- a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs @@ -36,7 +36,7 @@ public Document Build(IIdentifiable entity) Meta = GetMeta(entity) }; - if(ShouldIncludePageLinks(contextEntity)) + if (ShouldIncludePageLinks(contextEntity)) document.Links = _jsonApiContext.PageManager.GetPageLinks(new LinkBuilder(_jsonApiContext)); document.Included = AppendIncludedObject(document.Included, contextEntity, entity); @@ -59,7 +59,7 @@ public Documents Build(IEnumerable entities) Meta = GetMeta(enumeratedEntities.FirstOrDefault()) }; - if(ShouldIncludePageLinks(contextEntity)) + if (ShouldIncludePageLinks(contextEntity)) documents.Links = _jsonApiContext.PageManager.GetPageLinks(new LinkBuilder(_jsonApiContext)); foreach (var entity in enumeratedEntities) @@ -74,20 +74,20 @@ public Documents Build(IEnumerable entities) private Dictionary GetMeta(IIdentifiable entity) { if (entity == null) return null; - + var builder = _jsonApiContext.MetaBuilder; - if(entity is IHasMeta metaEntity) + if (entity is IHasMeta metaEntity) builder.Add(metaEntity.GetMeta(_jsonApiContext)); - if(_jsonApiContext.Options.IncludeTotalRecordCount) + if (_jsonApiContext.Options.IncludeTotalRecordCount) builder.Add("total-records", _jsonApiContext.PageManager.TotalRecords); - - if(_requestMeta != null) + + if (_requestMeta != null) builder.Add(_requestMeta.GetMeta()); var meta = builder.Build(); - if(meta.Count > 0) return meta; + if (meta.Count > 0) return meta; return null; } @@ -119,7 +119,7 @@ public DocumentData GetData(ContextEntity contextEntity, IIdentifiable entity) contextEntity.Attributes.ForEach(attr => { - if(ShouldIncludeAttribute(attr)) + if (ShouldIncludeAttribute(attr)) data.Attributes.Add(attr.PublicAttributeName, attr.GetValue(entity)); }); @@ -131,8 +131,8 @@ public DocumentData GetData(ContextEntity contextEntity, IIdentifiable entity) private bool ShouldIncludeAttribute(AttrAttribute attr) { - return (_jsonApiContext.QuerySet == null - || _jsonApiContext.QuerySet.Fields.Count == 0 + return (_jsonApiContext.QuerySet == null + || _jsonApiContext.QuerySet.Fields.Count == 0 || _jsonApiContext.QuerySet.Fields.Contains(attr.InternalAttributeName)); } @@ -145,13 +145,13 @@ private void AddRelationships(DocumentData data, ContextEntity contextEntity, II { var relationshipData = new RelationshipData(); - if(r.DocumentLinks.HasFlag(Link.None) == false) + if (r.DocumentLinks.HasFlag(Link.None) == false) { relationshipData.Links = new Links(); - if(r.DocumentLinks.HasFlag(Link.Self)) + if (r.DocumentLinks.HasFlag(Link.Self)) relationshipData.Links.Self = linkBuilder.GetSelfRelationLink(contextEntity.EntityName, entity.StringId, r.PublicRelationshipName); - - if(r.DocumentLinks.HasFlag(Link.Related)) + + if (r.DocumentLinks.HasFlag(Link.Related)) relationshipData.Links.Related = linkBuilder.GetRelatedRelationLink(contextEntity.EntityName, entity.StringId, r.PublicRelationshipName); } @@ -160,7 +160,7 @@ private void AddRelationships(DocumentData data, ContextEntity contextEntity, II var navigationEntity = _jsonApiContext.ContextGraph .GetRelationship(entity, r.InternalRelationshipName); - if(navigationEntity == null) + if (navigationEntity == null) relationshipData.SingleData = null; else if (navigationEntity is IEnumerable) relationshipData.ManyData = GetRelationships((IEnumerable)navigationEntity); @@ -194,19 +194,22 @@ private List AddIncludedEntity(List entities, IIdent { var includedEntity = GetIncludedEntity(entity); - if(entities == null) + if (entities == null) entities = new List(); - if(includedEntity != null && !entities.Any(doc => doc.Id == includedEntity.Id && doc.Type == includedEntity.Type)) + if (includedEntity != null && entities.Any(doc => + string.Equals(doc.Id, includedEntity.Id) && string.Equals(doc.Type, includedEntity.Type)) == false) + { entities.Add(includedEntity); + } return entities; } private DocumentData GetIncludedEntity(IIdentifiable entity) { - if(entity == null) return null; - + if (entity == null) return null; + var contextEntity = _jsonApiContext.ContextGraph.GetContextEntity(entity.GetType()); var data = GetData(contextEntity, entity); From f54dc4a7eedc922947a8bd8cb03765f79a556d8c Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Tue, 26 Sep 2017 21:48:24 -0500 Subject: [PATCH 21/38] test(add): integration tests add articles --- JsonApiDotnetCore.sln | 15 ++ src/JsonApiDotNetCore/AssemblyInfo.cs | 3 + .../JsonApiOperationsInputFormatter.cs | 2 +- .../Formatters/JsonApiOperationsReader.cs | 4 +- .../Serialization/JsonApiDeSerializer.cs | 2 + test/OperationsExampleTests/.gitignore | 234 ++++++++++++++++++ test/OperationsExampleTests/Add/AddTests.cs | 102 ++++++++ .../Factories/ArticleFactory.cs | 25 ++ .../OperationsExampleTests.csproj | 23 ++ .../WebHostCollection.cs | 42 ++++ test/OperationsExampleTests/appsettings.json | 13 + 11 files changed, 462 insertions(+), 3 deletions(-) create mode 100644 src/JsonApiDotNetCore/AssemblyInfo.cs create mode 100644 test/OperationsExampleTests/.gitignore create mode 100644 test/OperationsExampleTests/Add/AddTests.cs create mode 100644 test/OperationsExampleTests/Factories/ArticleFactory.cs create mode 100644 test/OperationsExampleTests/OperationsExampleTests.csproj create mode 100644 test/OperationsExampleTests/WebHostCollection.cs create mode 100644 test/OperationsExampleTests/appsettings.json diff --git a/JsonApiDotnetCore.sln b/JsonApiDotnetCore.sln index 74ea28c41a..86ee801e58 100644 --- a/JsonApiDotnetCore.sln +++ b/JsonApiDotnetCore.sln @@ -30,6 +30,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReportsExample", "src\Examp EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperationsExample", "src\Examples\OperationsExample\OperationsExample.csproj", "{CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperationsExampleTests", "test\OperationsExampleTests\OperationsExampleTests.csproj", "{9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -124,6 +126,18 @@ Global {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x64.Build.0 = Release|x64 {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x86.ActiveCfg = Release|x86 {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x86.Build.0 = Release|x86 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x64.ActiveCfg = Debug|x64 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x64.Build.0 = Debug|x64 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x86.ActiveCfg = Debug|x86 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x86.Build.0 = Debug|x86 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|Any CPU.Build.0 = Release|Any CPU + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x64.ActiveCfg = Release|x64 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x64.Build.0 = Release|x64 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x86.ActiveCfg = Release|x86 + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -138,5 +152,6 @@ Global {026FBC6C-AF76-4568-9B87-EC73457899FD} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF} {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D} = {026FBC6C-AF76-4568-9B87-EC73457899FD} {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D} = {026FBC6C-AF76-4568-9B87-EC73457899FD} + {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F} EndGlobalSection EndGlobal diff --git a/src/JsonApiDotNetCore/AssemblyInfo.cs b/src/JsonApiDotNetCore/AssemblyInfo.cs new file mode 100644 index 0000000000..9aa4855d37 --- /dev/null +++ b/src/JsonApiDotNetCore/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("OperationsExampleTests")] diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs index de5ed86bf1..6f114aff33 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs @@ -8,7 +8,7 @@ namespace JsonApiDotNetCore.Formatters { public class JsonApiOperationsInputFormatter : IInputFormatter { - const string PROFILE_EXTENSION = "; rel=\"profile\""; + internal const string PROFILE_EXTENSION = "; rel=\"profile\""; public bool CanRead(InputFormatterContext context) { diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs index 9cfc4c177b..912cac2fff 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs @@ -22,13 +22,13 @@ public Task ReadAsync(InputFormatterContext context) var request = context.HttpContext.Request; if (request.ContentLength == null || request.ContentLength == 0) - return InputFormatterResult.FailureAsync(); + throw new JsonApiException(400, "Content-Length cannot be empty."); var body = GetRequestBody(request.Body); var operations = JsonConvert.DeserializeObject(body); - if(operations == null) + if (operations == null) throw new JsonApiException(400, "Failed to deserialize operations request."); return InputFormatterResult.SuccessAsync(operations); diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index 05394fe551..07732a2910 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -80,6 +80,8 @@ public List DeserializeList(string requestBody) public object DocumentToObject(DocumentData data) { + if (data == null) throw new JsonApiException(422, "Failed to deserialize document as json:api."); + var contextEntity = _jsonApiContext.ContextGraph.GetContextEntity(data.Type?.ToString()); _jsonApiContext.RequestEntity = contextEntity; diff --git a/test/OperationsExampleTests/.gitignore b/test/OperationsExampleTests/.gitignore new file mode 100644 index 0000000000..0ca27f04e1 --- /dev/null +++ b/test/OperationsExampleTests/.gitignore @@ -0,0 +1,234 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ diff --git a/test/OperationsExampleTests/Add/AddTests.cs b/test/OperationsExampleTests/Add/AddTests.cs new file mode 100644 index 0000000000..b42dc342f1 --- /dev/null +++ b/test/OperationsExampleTests/Add/AddTests.cs @@ -0,0 +1,102 @@ +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using JsonApiDotNetCore.Extensions; +using Microsoft.EntityFrameworkCore; +using OperationsExample.Data; +using OperationsExampleTests.Factories; +using Xunit; + +namespace OperationsExampleTests +{ + [Collection("WebHostCollection")] + public class AddTests + { + private readonly Fixture _fixture; + + public AddTests(Fixture fixture) + { + _fixture = fixture; + } + + [Fact] + public async Task Can_Create_Article() + { + // arrange + var context = _fixture.GetService(); + var article = ArticleFactory.Get(); + var content = new + { + operations = new[] { + new { + op = "add", + data = new { + type = "articles", + attributes = new { + name = article.Name + } + } + } + } + }; + + // act + var response = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(response); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var lastArticle = await context.Articles.LastAsync(); + Assert.Equal(article.Name, lastArticle.Name); + } + + [Fact] + public async Task Can_Create_Articles() + { + // arrange + var context = _fixture.GetService(); + var articles = ArticleFactory.Get(2); + var content = new + { + operations = new[] { + new { + op = "add", + data = new { + type = "articles", + attributes = new { + name = articles[0].Name + } + } + }, + new { + op = "add", + data = new { + type = "articles", + attributes = new { + name = articles[1].Name + } + } + } + } + }; + + // act + var response = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(response); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var lastArticles = (await context.Articles + .OrderByDescending(d => d.Id) + .Take(2) + .ToListAsync()) + .OrderBy(l => l.Id) + .ToList(); + + Assert.Equal(articles[0].Name, lastArticles[0].Name); + Assert.Equal(articles[1].Name, lastArticles[1].Name); + } + } +} diff --git a/test/OperationsExampleTests/Factories/ArticleFactory.cs b/test/OperationsExampleTests/Factories/ArticleFactory.cs new file mode 100644 index 0000000000..1907e2de24 --- /dev/null +++ b/test/OperationsExampleTests/Factories/ArticleFactory.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using Bogus; +using OperationsExample.Models; + +namespace OperationsExampleTests.Factories +{ + public static class ArticleFactory + { + public static Article Get() + { + var faker = new Faker
(); + faker.RuleFor(m => m.Name, f => f.Lorem.Sentence()); + return faker.Generate(); + } + + public static List
Get(int count) + { + var articles = new List
(); + for (int i = 0; i < count; i++) + articles.Add(Get()); + + return articles; + } + } +} \ No newline at end of file diff --git a/test/OperationsExampleTests/OperationsExampleTests.csproj b/test/OperationsExampleTests/OperationsExampleTests.csproj new file mode 100644 index 0000000000..18e795cb9e --- /dev/null +++ b/test/OperationsExampleTests/OperationsExampleTests.csproj @@ -0,0 +1,23 @@ + + + netcoreapp1.1 + false + OperationsExampleTests + + + + + + + + + + + + + + + PreserveNewest + + + \ No newline at end of file diff --git a/test/OperationsExampleTests/WebHostCollection.cs b/test/OperationsExampleTests/WebHostCollection.cs new file mode 100644 index 0000000000..a92285aff0 --- /dev/null +++ b/test/OperationsExampleTests/WebHostCollection.cs @@ -0,0 +1,42 @@ +using System.Net.Http; +using Microsoft.AspNetCore.Hosting; +using OperationsExample; +using Xunit; +using Microsoft.AspNetCore.TestHost; +using Newtonsoft.Json; +using System.Net.Http.Headers; +using System.Threading.Tasks; +using JsonApiDotNetCore.Formatters; + +namespace OperationsExampleTests +{ + [CollectionDefinition("WebHostCollection")] + public class WebHostCollection + : ICollectionFixture + { } + + public class Fixture + { + public Fixture() + { + var builder = new WebHostBuilder().UseStartup(); + Server = new TestServer(builder); + Client = Server.CreateClient(); + } + + public TestServer Server { get; private set; } + public HttpClient Client { get; } + public T GetService() => (T)Server.Host.Services.GetService(typeof(T)); + + public async Task PatchAsync(string route, object data) + { + var httpMethod = new HttpMethod("PATCH"); + var request = new HttpRequestMessage(httpMethod, route); + request.Content = new StringContent(JsonConvert.SerializeObject(data)); + request.Content.Headers.ContentLength = 1; + request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); + request.Content.Headers.Add("Link", JsonApiOperationsInputFormatter.PROFILE_EXTENSION); + return await Client.SendAsync(request); + } + } +} \ No newline at end of file diff --git a/test/OperationsExampleTests/appsettings.json b/test/OperationsExampleTests/appsettings.json new file mode 100644 index 0000000000..c1061281cc --- /dev/null +++ b/test/OperationsExampleTests/appsettings.json @@ -0,0 +1,13 @@ +{ + "Data": { + "DefaultConnection": "Host=localhost;Port=5432;Database=OperationsExample;User ID=postgres;Password=password" + }, + "Logging": { + "IncludeScopes": false, + "LogLevel": { + "Default": "Trace", + "System": "Trace", + "Microsoft": "Trace" + } + } +} From ee5b34a35c755ecdfd42567d5a04824dd7d15488 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Tue, 26 Sep 2017 23:28:22 -0500 Subject: [PATCH 22/38] feat(fetch): add get all operation --- .../JsonApiOperationsController.cs | 6 +- .../IServiceCollectionExtensions.cs | 10 +++ .../Models/Operations/OperationsDocument.cs | 8 ++ .../Services/IJsonApiContext.cs | 1 - ...r.cs => DocumentDataPointerReplacement.cs} | 0 .../Operations/OperationProcessorResolver.cs | 25 +++++- .../Operations/OperationsProcessor.cs | 39 ++++++++- .../Operations/Processors/GetOpProcessor.cs | 79 +++++++++++++++++++ .../ResourceRefPointerReplacement.cs | 34 ++++++++ test/OperationsExampleTests/Get/GetTests.cs | 49 ++++++++++++ .../WebHostCollection.cs | 9 +++ 11 files changed, 251 insertions(+), 9 deletions(-) rename src/JsonApiDotNetCore/Services/Operations/{OperationsPointerExchanger.cs => DocumentDataPointerReplacement.cs} (100%) create mode 100644 src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs create mode 100644 src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs create mode 100644 test/OperationsExampleTests/Get/GetTests.cs diff --git a/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs index 3990f7b85d..f3d0b6651d 100644 --- a/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs +++ b/src/JsonApiDotNetCore/Controllers/JsonApiOperationsController.cs @@ -9,7 +9,8 @@ public class JsonApiOperationsController : Controller { private readonly IOperationsProcessor _operationsProcessor; - public JsonApiOperationsController(IOperationsProcessor operationsProcessor) + public JsonApiOperationsController( + IOperationsProcessor operationsProcessor) { _operationsProcessor = operationsProcessor; } @@ -18,7 +19,8 @@ public JsonApiOperationsController(IOperationsProcessor operationsProcessor) public async Task PatchAsync([FromBody] OperationsDocument doc) { var results = await _operationsProcessor.ProcessAsync(doc.Operations); - return Ok(results); + + return Ok(new OperationsDocument(results)); } } } diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index ab297252f9..dc9bd56cef 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -100,8 +100,13 @@ public static void AddJsonApiInternals( services.AddScoped(); services.AddScoped(typeof(IEntityRepository<>), typeof(DefaultEntityRepository<>)); services.AddScoped(typeof(IEntityRepository<,>), typeof(DefaultEntityRepository<,>)); + services.AddScoped(typeof(ICreateService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(ICreateService<,>), typeof(EntityResourceService<,>)); + + services.AddScoped(typeof(IGetAllService<>), typeof(EntityResourceService<>)); + services.AddScoped(typeof(IGetAllService<,>), typeof(EntityResourceService<,>)); + services.AddScoped(typeof(IResourceService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IResourceService<,>), typeof(EntityResourceService<,>)); services.AddSingleton(jsonApiOptions); @@ -127,8 +132,13 @@ public static void AddJsonApiInternals( private static void AddOperationServices(IServiceCollection services) { services.AddScoped(); + services.AddScoped(typeof(ICreateOpProcessor<>), typeof(CreateOpProcessor<>)); services.AddScoped(typeof(ICreateOpProcessor<,>), typeof(CreateOpProcessor<,>)); + + services.AddScoped(typeof(IGetOpProcessor<>), typeof(GetOpProcessor<>)); + services.AddScoped(typeof(IGetOpProcessor<,>), typeof(GetOpProcessor<,>)); + services.AddSingleton(); services.AddSingleton(); } diff --git a/src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs b/src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs index 987f9abc20..3228e9ca88 100644 --- a/src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs +++ b/src/JsonApiDotNetCore/Models/Operations/OperationsDocument.cs @@ -1,9 +1,17 @@ using System.Collections.Generic; +using Newtonsoft.Json; namespace JsonApiDotNetCore.Models.Operations { public class OperationsDocument { + public OperationsDocument() { } + public OperationsDocument(List operations) + { + Operations = operations; + } + + [JsonProperty("operations")] public List Operations { get; set; } } } diff --git a/src/JsonApiDotNetCore/Services/IJsonApiContext.cs b/src/JsonApiDotNetCore/Services/IJsonApiContext.cs index 7b1b9e67a8..2a201e2691 100644 --- a/src/JsonApiDotNetCore/Services/IJsonApiContext.cs +++ b/src/JsonApiDotNetCore/Services/IJsonApiContext.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Reflection; using JsonApiDotNetCore.Builders; using JsonApiDotNetCore.Configuration; using JsonApiDotNetCore.Data; diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs b/src/JsonApiDotNetCore/Services/Operations/DocumentDataPointerReplacement.cs similarity index 100% rename from src/JsonApiDotNetCore/Services/Operations/OperationsPointerExchanger.cs rename to src/JsonApiDotNetCore/Services/Operations/DocumentDataPointerReplacement.cs diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs index 64261af1c7..1fbe130d0d 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs @@ -8,13 +8,15 @@ namespace JsonApiDotNetCore.Services.Operations public interface IOperationProcessorResolver { IOpProcessor LocateCreateService(Operation operation); + IOpProcessor LocateGeteService(Operation operation); } public class OperationProcessorResolver : IOperationProcessorResolver { private readonly IGenericProcessorFactory _processorFactory; private readonly IJsonApiContext _context; - private ConcurrentDictionary _cachedProcessors = new ConcurrentDictionary(); + private ConcurrentDictionary _createOpProcessors = new ConcurrentDictionary(); + private ConcurrentDictionary _getOpProcessors = new ConcurrentDictionary(); public OperationProcessorResolver( IGenericProcessorFactory processorFactory, @@ -30,7 +32,7 @@ public IOpProcessor LocateCreateService(Operation operation) { var resource = operation.GetResourceTypeName(); - if (_cachedProcessors.TryGetValue(resource, out IOpProcessor cachedProcessor)) + if (_createOpProcessors.TryGetValue(resource, out IOpProcessor cachedProcessor)) return cachedProcessor; var contextEntity = _context.ContextGraph.GetContextEntity(resource); @@ -38,7 +40,24 @@ public IOpProcessor LocateCreateService(Operation operation) typeof(ICreateOpProcessor<,>), contextEntity.EntityType, contextEntity.IdentityType ); - _cachedProcessors[resource] = processor; + _createOpProcessors[resource] = processor; + + return processor; + } + + public IOpProcessor LocateGeteService(Operation operation) + { + var resource = operation.GetResourceTypeName(); + + if (_getOpProcessors.TryGetValue(resource, out IOpProcessor cachedProcessor)) + return cachedProcessor; + + var contextEntity = _context.ContextGraph.GetContextEntity(resource); + var processor = _processorFactory.GetProcessor( + typeof(IGetOpProcessor<,>), contextEntity.EntityType, contextEntity.IdentityType + ); + + _getOpProcessors[resource] = processor; return processor; } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index 75e013c8c8..bc241e72ad 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -1,5 +1,8 @@ +using System; using System.Collections.Generic; using System.Threading.Tasks; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Models.Pointers; @@ -28,10 +31,11 @@ public async Task> ProcessAsync(List inputOps) // TODO: parse pointers: // locate all objects within the document and replace them var operationsPointer = new OperationsPointer(); - var replacer = new DocumentDataPointerReplacement(op.DataObject); - replacer.ReplacePointers(outputOps); - var processor = _processorResolver.LocateCreateService(op); + ReplaceDataPointers(op.DataObject, outputOps); + ReplaceRefPointers(op.Ref, outputOps); + + var processor = GetOperationsProcessor(op); var resultOp = await processor.ProcessAsync(op); if (resultOp != null) @@ -40,5 +44,34 @@ public async Task> ProcessAsync(List inputOps) return outputOps; } + + private void ReplaceDataPointers(DocumentData dataObject, List outputOps) + { + if (dataObject == null) return; + + var replacer = new DocumentDataPointerReplacement(dataObject); + replacer.ReplacePointers(outputOps); + } + + private void ReplaceRefPointers(ResourceReference resourceRef, List outputOps) + { + if (resourceRef == null) return; + + var replacer = new ResourceRefPointerReplacement(resourceRef); + replacer.ReplacePointers(outputOps); + } + + private IOpProcessor GetOperationsProcessor(Operation op) + { + switch (op.Op) + { + case OperationCode.add: + return _processorResolver.LocateCreateService(op); + case OperationCode.get: + return _processorResolver.LocateGeteService(op); + default: + throw new JsonApiException(400, $"'{op.Op}' is not a valid operation code"); + } + } } } diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs new file mode 100644 index 0000000000..cc6f864516 --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs @@ -0,0 +1,79 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Serialization; +using JsonApiDotNetCore.Services; + +namespace JsonApiDotNetCore.Services.Operations.Processors +{ + public interface IGetOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + + public interface IGetOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + + public class GetOpProcessor : GetOpProcessor + where T : class, IIdentifiable + { + public GetOpProcessor( + IGetAllService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder, + IContextGraph contextGraph, + IJsonApiContext jsonApiContext + ) : base(service, deSerializer, documentBuilder, contextGraph, jsonApiContext) + { } + } + + public class GetOpProcessor : IGetOpProcessor + where T : class, IIdentifiable + { + private readonly IGetAllService _service; + private readonly IJsonApiDeSerializer _deSerializer; + private readonly IDocumentBuilder _documentBuilder; + private readonly IContextGraph _contextGraph; + private readonly IJsonApiContext _jsonApiContext; + + public GetOpProcessor( + IGetAllService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder, + IContextGraph contextGraph, + IJsonApiContext jsonApiContext) + { + _service = service; + _deSerializer = deSerializer; + _documentBuilder = documentBuilder; + _contextGraph = contextGraph; + _jsonApiContext = jsonApiContext.ApplyContext(this); + } + + public async Task ProcessAsync(Operation operation) + { + var result = await _service.GetAsync(); + + var operationResult = new Operation + { + Op = OperationCode.add + }; + + var operations = new List(); + foreach (var resource in result) + { + var doc = _documentBuilder.GetData( + _contextGraph.GetContextEntity(operation.GetResourceTypeName()), + resource); + operations.Add(doc); + } + + operationResult.Data = operations; + + return operationResult; + } + } +} diff --git a/src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs b/src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs new file mode 100644 index 0000000000..d24d7e879a --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using JsonApiDotNetCore.Models.Pointers; +using Newtonsoft.Json.Linq; +using JsonApiDotNetCore.Extensions; +using JsonApiDotNetCore.Models.Operations; + +namespace JsonApiDotNetCore.Services.Operations +{ + public class ResourceRefPointerReplacement + where TPointer : Pointer, new() + { + private readonly ResourceReference _ref; + + public ResourceRefPointerReplacement(ResourceReference data) + { + _ref = data; + } + + public void ReplacePointers(List parentDoc) + { + _ref.Id = GetPointerValue(_ref.Id, parentDoc); + _ref.Type = GetPointerValue(_ref.Type, parentDoc); + } + + private object GetPointerValue(object reference, List parentDoc) + { + if (reference is JObject jObj) + if (jObj.TryParse(Pointer.JsonSchema, out Pointer pointer)) + return pointer.GetValue(parentDoc); + + return reference; + } + } +} \ No newline at end of file diff --git a/test/OperationsExampleTests/Get/GetTests.cs b/test/OperationsExampleTests/Get/GetTests.cs new file mode 100644 index 0000000000..1b04df8089 --- /dev/null +++ b/test/OperationsExampleTests/Get/GetTests.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using System.Net; +using System.Threading.Tasks; +using JsonApiDotNetCore.Models.Operations; +using Microsoft.EntityFrameworkCore; +using OperationsExample.Data; +using Xunit; + +namespace OperationsExampleTests +{ + [Collection("WebHostCollection")] + public class GetTests + { + private readonly Fixture _fixture; + + public GetTests(Fixture fixture) + { + _fixture = fixture; + } + + [Fact] + public async Task Can_Get_Articles() + { + // arrange + var context = _fixture.GetService(); + var articles = await context.Articles.ToListAsync(); + + var content = new + { + operations = new[] { + new Dictionary { + { "op", "get"}, + { "ref", new { type = "articles" } } + } + } + }; + + // act + var result = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(result.response); + Assert.NotNull(result.data); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); + Assert.Equal(1, result.data.Operations.Count); + Assert.Equal(articles.Count, result.data.Operations[0].DataList.Count); + } + } +} diff --git a/test/OperationsExampleTests/WebHostCollection.cs b/test/OperationsExampleTests/WebHostCollection.cs index a92285aff0..6ddbebd433 100644 --- a/test/OperationsExampleTests/WebHostCollection.cs +++ b/test/OperationsExampleTests/WebHostCollection.cs @@ -1,3 +1,4 @@ +using System; using System.Net.Http; using Microsoft.AspNetCore.Hosting; using OperationsExample; @@ -38,5 +39,13 @@ public async Task PatchAsync(string route, object data) request.Content.Headers.Add("Link", JsonApiOperationsInputFormatter.PROFILE_EXTENSION); return await Client.SendAsync(request); } + + public async Task<(HttpResponseMessage response, T data)> PatchAsync(string route, object data) + { + var response = await PatchAsync(route, data); + var json = await response.Content.ReadAsStringAsync(); + var obj = JsonConvert.DeserializeObject(json); + return (response, obj); + } } } \ No newline at end of file From 0f99794237654373fc5e7496c280ccd49e0d68ab Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Tue, 26 Sep 2017 23:42:03 -0500 Subject: [PATCH 23/38] feat(fetch): get by id operation --- .../IServiceCollectionExtensions.cs | 5 +- .../Operations/Processors/GetOpProcessor.cs | 47 ++++++++++++++----- test/OperationsExampleTests/Get/GetTests.cs | 31 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-) diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index dc9bd56cef..9985f957bc 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -100,13 +100,16 @@ public static void AddJsonApiInternals( services.AddScoped(); services.AddScoped(typeof(IEntityRepository<>), typeof(DefaultEntityRepository<>)); services.AddScoped(typeof(IEntityRepository<,>), typeof(DefaultEntityRepository<,>)); - + services.AddScoped(typeof(ICreateService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(ICreateService<,>), typeof(EntityResourceService<,>)); services.AddScoped(typeof(IGetAllService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IGetAllService<,>), typeof(EntityResourceService<,>)); + services.AddScoped(typeof(IGetByIdService<>), typeof(EntityResourceService<>)); + services.AddScoped(typeof(IGetByIdService<,>), typeof(EntityResourceService<,>)); + services.AddScoped(typeof(IResourceService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IResourceService<,>), typeof(EntityResourceService<,>)); services.AddSingleton(jsonApiOptions); diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs index cc6f864516..8bd5b2b0f4 100644 --- a/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/GetOpProcessor.cs @@ -5,7 +5,6 @@ using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Serialization; -using JsonApiDotNetCore.Services; namespace JsonApiDotNetCore.Services.Operations.Processors { @@ -21,32 +20,36 @@ public class GetOpProcessor : GetOpProcessor where T : class, IIdentifiable { public GetOpProcessor( - IGetAllService service, + IGetAllService getAll, + IGetByIdService getById, IJsonApiDeSerializer deSerializer, IDocumentBuilder documentBuilder, IContextGraph contextGraph, IJsonApiContext jsonApiContext - ) : base(service, deSerializer, documentBuilder, contextGraph, jsonApiContext) + ) : base(getAll, getById, deSerializer, documentBuilder, contextGraph, jsonApiContext) { } } public class GetOpProcessor : IGetOpProcessor where T : class, IIdentifiable { - private readonly IGetAllService _service; + private readonly IGetAllService _getAll; + private readonly IGetByIdService _getById; private readonly IJsonApiDeSerializer _deSerializer; private readonly IDocumentBuilder _documentBuilder; private readonly IContextGraph _contextGraph; private readonly IJsonApiContext _jsonApiContext; public GetOpProcessor( - IGetAllService service, + IGetAllService getAll, + IGetByIdService getById, IJsonApiDeSerializer deSerializer, IDocumentBuilder documentBuilder, IContextGraph contextGraph, IJsonApiContext jsonApiContext) { - _service = service; + _getAll = getAll; + _getById = getById; _deSerializer = deSerializer; _documentBuilder = documentBuilder; _contextGraph = contextGraph; @@ -55,25 +58,43 @@ public GetOpProcessor( public async Task ProcessAsync(Operation operation) { - var result = await _service.GetAsync(); - var operationResult = new Operation { - Op = OperationCode.add + Op = OperationCode.get }; + operationResult.Data = string.IsNullOrWhiteSpace(operation.Ref.Id?.ToString()) + ? await GetAllAsync(operation) + : await GetByIdAsync(operation); + + return operationResult; + } + + private async Task GetAllAsync(Operation operation) + { + var result = await _getAll.GetAsync(); + var operations = new List(); foreach (var resource in result) { var doc = _documentBuilder.GetData( - _contextGraph.GetContextEntity(operation.GetResourceTypeName()), - resource); + _contextGraph.GetContextEntity(operation.GetResourceTypeName()), + resource); operations.Add(doc); } - operationResult.Data = operations; + return operations; + } - return operationResult; + private async Task GetByIdAsync(Operation operation) + { + var id = TypeHelper.ConvertType(operation.Ref.Id); + var result = await _getById.GetAsync(id); + var doc = _documentBuilder.GetData( + _contextGraph.GetContextEntity(operation.GetResourceTypeName()), + result); + + return doc; } } } diff --git a/test/OperationsExampleTests/Get/GetTests.cs b/test/OperationsExampleTests/Get/GetTests.cs index 1b04df8089..82233a4fc8 100644 --- a/test/OperationsExampleTests/Get/GetTests.cs +++ b/test/OperationsExampleTests/Get/GetTests.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using System.Net; using System.Threading.Tasks; using JsonApiDotNetCore.Models.Operations; @@ -43,7 +44,35 @@ public async Task Can_Get_Articles() Assert.NotNull(result.data); Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); Assert.Equal(1, result.data.Operations.Count); - Assert.Equal(articles.Count, result.data.Operations[0].DataList.Count); + Assert.Equal(articles.Count, result.data.Operations.Single().DataList.Count); + } + + [Fact] + public async Task Can_Get_Article_By_Id() + { + // arrange + var context = _fixture.GetService(); + var article = await context.Articles.LastAsync(); + + var content = new + { + operations = new[] { + new Dictionary { + { "op", "get"}, + { "ref", new { type = "articles", id = article.StringId } } + } + } + }; + + // act + var result = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(result.response); + Assert.NotNull(result.data); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); + Assert.Equal(1, result.data.Operations.Count); + Assert.Equal(article.Id.ToString(), result.data.Operations.Single().DataObject.Id); } } } From 69323c6808a31ee982a2a5b7615de74433641024 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 22 Oct 2017 21:14:42 -0500 Subject: [PATCH 24/38] replace operations --- .../IServiceCollectionExtensions.cs | 6 + .../Operations/OperationProcessorResolver.cs | 23 +++- .../Operations/OperationsProcessor.cs | 4 +- .../Processors/ReplaceOpProcessor.cs | 75 ++++++++++++ test/OperationsExampleTests/Get/GetTests.cs | 16 ++- .../Replace/ReplaceTests.cs | 112 ++++++++++++++++++ .../WebHostCollection.cs | 3 +- 7 files changed, 230 insertions(+), 9 deletions(-) create mode 100644 src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs create mode 100644 test/OperationsExampleTests/Replace/ReplaceTests.cs diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index 9985f957bc..3788f62c19 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -110,6 +110,9 @@ public static void AddJsonApiInternals( services.AddScoped(typeof(IGetByIdService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IGetByIdService<,>), typeof(EntityResourceService<,>)); + services.AddScoped(typeof(IUpdateService<>), typeof(EntityResourceService<>)); + services.AddScoped(typeof(IUpdateService<,>), typeof(EntityResourceService<,>)); + services.AddScoped(typeof(IResourceService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IResourceService<,>), typeof(EntityResourceService<,>)); services.AddSingleton(jsonApiOptions); @@ -142,6 +145,9 @@ private static void AddOperationServices(IServiceCollection services) services.AddScoped(typeof(IGetOpProcessor<>), typeof(GetOpProcessor<>)); services.AddScoped(typeof(IGetOpProcessor<,>), typeof(GetOpProcessor<,>)); + services.AddScoped(typeof(IReplaceOpProcessor<>), typeof(ReplaceOpProcessor<>)); + services.AddScoped(typeof(IReplaceOpProcessor<,>), typeof(ReplaceOpProcessor<,>)); + services.AddSingleton(); services.AddSingleton(); } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs index 1fbe130d0d..544cbe9fa0 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs @@ -8,7 +8,8 @@ namespace JsonApiDotNetCore.Services.Operations public interface IOperationProcessorResolver { IOpProcessor LocateCreateService(Operation operation); - IOpProcessor LocateGeteService(Operation operation); + IOpProcessor LocateGetService(Operation operation); + IOpProcessor LocateReplaceService(Operation operation); } public class OperationProcessorResolver : IOperationProcessorResolver @@ -17,6 +18,7 @@ public class OperationProcessorResolver : IOperationProcessorResolver private readonly IJsonApiContext _context; private ConcurrentDictionary _createOpProcessors = new ConcurrentDictionary(); private ConcurrentDictionary _getOpProcessors = new ConcurrentDictionary(); + private ConcurrentDictionary _replaceOpProcessors = new ConcurrentDictionary(); public OperationProcessorResolver( IGenericProcessorFactory processorFactory, @@ -45,7 +47,7 @@ public IOpProcessor LocateCreateService(Operation operation) return processor; } - public IOpProcessor LocateGeteService(Operation operation) + public IOpProcessor LocateGetService(Operation operation) { var resource = operation.GetResourceTypeName(); @@ -61,5 +63,22 @@ public IOpProcessor LocateGeteService(Operation operation) return processor; } + + public IOpProcessor LocateReplaceService(Operation operation) + { + var resource = operation.GetResourceTypeName(); + + if (_replaceOpProcessors.TryGetValue(resource, out IOpProcessor cachedProcessor)) + return cachedProcessor; + + var contextEntity = _context.ContextGraph.GetContextEntity(resource); + var processor = _processorFactory.GetProcessor( + typeof(IReplaceOpProcessor<,>), contextEntity.EntityType, contextEntity.IdentityType + ); + + _replaceOpProcessors[resource] = processor; + + return processor; + } } } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index bc241e72ad..9a66245f67 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -68,7 +68,9 @@ private IOpProcessor GetOperationsProcessor(Operation op) case OperationCode.add: return _processorResolver.LocateCreateService(op); case OperationCode.get: - return _processorResolver.LocateGeteService(op); + return _processorResolver.LocateGetService(op); + case OperationCode.replace: + return _processorResolver.LocateReplaceService(op); default: throw new JsonApiException(400, $"'{op.Op}' is not a valid operation code"); } diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs new file mode 100644 index 0000000000..a426be7236 --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs @@ -0,0 +1,75 @@ +using System; +using System.Threading.Tasks; +using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Serialization; +using Newtonsoft.Json; + +namespace JsonApiDotNetCore.Services.Operations.Processors +{ + public interface IReplaceOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + + public interface IReplaceOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + + public class ReplaceOpProcessor : ReplaceOpProcessor + where T : class, IIdentifiable + { + public ReplaceOpProcessor( + IUpdateService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder, + IContextGraph contextGraph + ) : base(service, deSerializer, documentBuilder, contextGraph) + { } + } + + public class ReplaceOpProcessor : IReplaceOpProcessor + where T : class, IIdentifiable + { + private readonly IUpdateService _service; + private readonly IJsonApiDeSerializer _deSerializer; + private readonly IDocumentBuilder _documentBuilder; + private readonly IContextGraph _contextGraph; + + public ReplaceOpProcessor( + IUpdateService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder, + IContextGraph contextGraph) + { + _service = service; + _deSerializer = deSerializer; + _documentBuilder = documentBuilder; + _contextGraph = contextGraph; + } + + public async Task ProcessAsync(Operation operation) + { + Console.WriteLine(JsonConvert.SerializeObject(operation)); + var model = (T)_deSerializer.DocumentToObject(operation.DataObject); + + if (string.IsNullOrWhiteSpace(operation?.DataObject?.Id?.ToString())) + throw new JsonApiException(400, "The data.id parameter is required for replace operations"); + + var id = TypeHelper.ConvertType(operation.DataObject.Id); + var result = await _service.UpdateAsync(id, model); + + var operationResult = new Operation + { + Op = OperationCode.replace + }; + + operationResult.Data = _documentBuilder.GetData( + _contextGraph.GetContextEntity(operation.GetResourceTypeName()), + result); + + return operationResult; + } + } +} diff --git a/test/OperationsExampleTests/Get/GetTests.cs b/test/OperationsExampleTests/Get/GetTests.cs index 82233a4fc8..17c868cebd 100644 --- a/test/OperationsExampleTests/Get/GetTests.cs +++ b/test/OperationsExampleTests/Get/GetTests.cs @@ -2,9 +2,10 @@ using System.Linq; using System.Net; using System.Threading.Tasks; +using Bogus; using JsonApiDotNetCore.Models.Operations; -using Microsoft.EntityFrameworkCore; using OperationsExample.Data; +using OperationsExampleTests.Factories; using Xunit; namespace OperationsExampleTests @@ -13,6 +14,7 @@ namespace OperationsExampleTests public class GetTests { private readonly Fixture _fixture; + private readonly Faker _faker = new Faker(); public GetTests(Fixture fixture) { @@ -23,8 +25,12 @@ public GetTests(Fixture fixture) public async Task Can_Get_Articles() { // arrange + var expectedCount = _faker.Random.Int(1, 10); var context = _fixture.GetService(); - var articles = await context.Articles.ToListAsync(); + context.Articles.RemoveRange(context.Articles); + var articles = ArticleFactory.Get(expectedCount); + context.AddRange(articles); + context.SaveChanges(); var content = new { @@ -44,7 +50,7 @@ public async Task Can_Get_Articles() Assert.NotNull(result.data); Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); Assert.Equal(1, result.data.Operations.Count); - Assert.Equal(articles.Count, result.data.Operations.Single().DataList.Count); + Assert.Equal(expectedCount, result.data.Operations.Single().DataList.Count); } [Fact] @@ -52,7 +58,9 @@ public async Task Can_Get_Article_By_Id() { // arrange var context = _fixture.GetService(); - var article = await context.Articles.LastAsync(); + var article = ArticleFactory.Get(); + context.Articles.Add(article); + context.SaveChanges(); var content = new { diff --git a/test/OperationsExampleTests/Replace/ReplaceTests.cs b/test/OperationsExampleTests/Replace/ReplaceTests.cs new file mode 100644 index 0000000000..521dcd979b --- /dev/null +++ b/test/OperationsExampleTests/Replace/ReplaceTests.cs @@ -0,0 +1,112 @@ +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using Bogus; +using JsonApiDotNetCore.Models.Operations; +using OperationsExample.Data; +using OperationsExampleTests.Factories; +using Xunit; + +namespace OperationsExampleTests +{ + [Collection("WebHostCollection")] + public class ReplaceTests + { + private readonly Fixture _fixture; + private readonly Faker _faker = new Faker(); + + public ReplaceTests(Fixture fixture) + { + _fixture = fixture; + } + + [Fact] + public async Task Can_Update_Article() + { + // arrange + var context = _fixture.GetService(); + var article = ArticleFactory.Get(); + var updates = ArticleFactory.Get(); + context.Articles.Add(article); + context.SaveChanges(); + + var content = new + { + operations = new[] { + new { + op = "replace", + data = new { + type = "articles", + id = article.Id, + attributes = new { + name = updates.Name + } + } + }, + } + }; + + // act + var result = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(result.response); + Assert.NotNull(result.data); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); + Assert.Equal(1, result.data.Operations.Count); + + var attrs = result.data.Operations.Single().DataObject.Attributes; + Assert.Equal(updates.Name, attrs["name"]); + } + + [Fact] + public async Task Can_Update_Articles() + { + // arrange + var count = _faker.Random.Int(1, 10); + var context = _fixture.GetService(); + + var articles = ArticleFactory.Get(count); + var updates = ArticleFactory.Get(count); + + context.Articles.AddRange(articles); + context.SaveChanges(); + + var content = new + { + operations = new List() + }; + + for (int i = 0; i < count; i++) + content.operations.Add(new + { + op = "replace", + data = new + { + type = "articles", + id = articles[i].Id, + attributes = new + { + name = updates[i].Name + } + } + }); + + // act + var result = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(result.response); + Assert.NotNull(result.data); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); + Assert.Equal(count, result.data.Operations.Count); + + for (int i = 0; i < count; i++) + { + var attrs = result.data.Operations[i].DataObject.Attributes; + Assert.Equal(updates[i].Name, attrs["name"]); + } + } + } +} diff --git a/test/OperationsExampleTests/WebHostCollection.cs b/test/OperationsExampleTests/WebHostCollection.cs index 6ddbebd433..dc4f02a58c 100644 --- a/test/OperationsExampleTests/WebHostCollection.cs +++ b/test/OperationsExampleTests/WebHostCollection.cs @@ -12,8 +12,7 @@ namespace OperationsExampleTests { [CollectionDefinition("WebHostCollection")] - public class WebHostCollection - : ICollectionFixture + public class WebHostCollection : ICollectionFixture { } public class Fixture From 7471aa51f3605c9fe2d818170667982d2b079349 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 22 Oct 2017 21:41:08 -0500 Subject: [PATCH 25/38] remove operations --- .../IServiceCollectionExtensions.cs | 6 ++ .../Operations/OperationProcessorResolver.cs | 22 +++++ .../Operations/OperationsProcessor.cs | 2 + .../Processors/RemoveOpProcessor.cs | 65 +++++++++++++ .../Processors/ReplaceOpProcessor.cs | 3 - .../Remove/RemoveTests.cs | 92 +++++++++++++++++++ 6 files changed, 187 insertions(+), 3 deletions(-) create mode 100644 src/JsonApiDotNetCore/Services/Operations/Processors/RemoveOpProcessor.cs create mode 100644 test/OperationsExampleTests/Remove/RemoveTests.cs diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index 3788f62c19..173544c2ce 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -113,6 +113,9 @@ public static void AddJsonApiInternals( services.AddScoped(typeof(IUpdateService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IUpdateService<,>), typeof(EntityResourceService<,>)); + services.AddScoped(typeof(IDeleteService<>), typeof(EntityResourceService<>)); + services.AddScoped(typeof(IDeleteService<,>), typeof(EntityResourceService<,>)); + services.AddScoped(typeof(IResourceService<>), typeof(EntityResourceService<>)); services.AddScoped(typeof(IResourceService<,>), typeof(EntityResourceService<,>)); services.AddSingleton(jsonApiOptions); @@ -148,6 +151,9 @@ private static void AddOperationServices(IServiceCollection services) services.AddScoped(typeof(IReplaceOpProcessor<>), typeof(ReplaceOpProcessor<>)); services.AddScoped(typeof(IReplaceOpProcessor<,>), typeof(ReplaceOpProcessor<,>)); + services.AddScoped(typeof(IRemoveOpProcessor<>), typeof(RemoveOpProcessor<>)); + services.AddScoped(typeof(IRemoveOpProcessor<,>), typeof(RemoveOpProcessor<,>)); + services.AddSingleton(); services.AddSingleton(); } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs index 544cbe9fa0..eeadc38e22 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationProcessorResolver.cs @@ -10,15 +10,20 @@ public interface IOperationProcessorResolver IOpProcessor LocateCreateService(Operation operation); IOpProcessor LocateGetService(Operation operation); IOpProcessor LocateReplaceService(Operation operation); + IOpProcessor LocateRemoveService(Operation operation); } public class OperationProcessorResolver : IOperationProcessorResolver { private readonly IGenericProcessorFactory _processorFactory; private readonly IJsonApiContext _context; + + // processor caches -- since there is some associated cost with creating the processors, we store them in memory + // to reduce the cost of subsequent requests. in the future, this may be moved into setup code run at startup private ConcurrentDictionary _createOpProcessors = new ConcurrentDictionary(); private ConcurrentDictionary _getOpProcessors = new ConcurrentDictionary(); private ConcurrentDictionary _replaceOpProcessors = new ConcurrentDictionary(); + private ConcurrentDictionary _removeOpProcessors = new ConcurrentDictionary(); public OperationProcessorResolver( IGenericProcessorFactory processorFactory, @@ -80,5 +85,22 @@ public IOpProcessor LocateReplaceService(Operation operation) return processor; } + + public IOpProcessor LocateRemoveService(Operation operation) + { + var resource = operation.GetResourceTypeName(); + + if (_removeOpProcessors.TryGetValue(resource, out IOpProcessor cachedProcessor)) + return cachedProcessor; + + var contextEntity = _context.ContextGraph.GetContextEntity(resource); + var processor = _processorFactory.GetProcessor( + typeof(IRemoveOpProcessor<,>), contextEntity.EntityType, contextEntity.IdentityType + ); + + _removeOpProcessors[resource] = processor; + + return processor; + } } } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index 9a66245f67..05c87dd0f7 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -71,6 +71,8 @@ private IOpProcessor GetOperationsProcessor(Operation op) return _processorResolver.LocateGetService(op); case OperationCode.replace: return _processorResolver.LocateReplaceService(op); + case OperationCode.remove: + return _processorResolver.LocateRemoveService(op); default: throw new JsonApiException(400, $"'{op.Op}' is not a valid operation code"); } diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/RemoveOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/RemoveOpProcessor.cs new file mode 100644 index 0000000000..c96af5bb37 --- /dev/null +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/RemoveOpProcessor.cs @@ -0,0 +1,65 @@ +using System; +using System.Threading.Tasks; +using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; +using JsonApiDotNetCore.Serialization; + +namespace JsonApiDotNetCore.Services.Operations.Processors +{ + public interface IRemoveOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + + public interface IRemoveOpProcessor : IOpProcessor + where T : class, IIdentifiable + { } + + public class RemoveOpProcessor : RemoveOpProcessor + where T : class, IIdentifiable + { + public RemoveOpProcessor( + IDeleteService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder, + IContextGraph contextGraph + ) : base(service, deSerializer, documentBuilder, contextGraph) + { } + } + + public class RemoveOpProcessor : IRemoveOpProcessor + where T : class, IIdentifiable + { + private readonly IDeleteService _service; + private readonly IJsonApiDeSerializer _deSerializer; + private readonly IDocumentBuilder _documentBuilder; + private readonly IContextGraph _contextGraph; + + public RemoveOpProcessor( + IDeleteService service, + IJsonApiDeSerializer deSerializer, + IDocumentBuilder documentBuilder, + IContextGraph contextGraph) + { + _service = service; + _deSerializer = deSerializer; + _documentBuilder = documentBuilder; + _contextGraph = contextGraph; + } + + public async Task ProcessAsync(Operation operation) + { + var stringId = operation.Ref?.Id?.ToString(); + if (string.IsNullOrWhiteSpace(stringId)) + throw new JsonApiException(400, "The data.id parameter is required for delete operations"); + + var id = TypeHelper.ConvertType(stringId); + var result = await _service.DeleteAsync(id); + + var operationResult = new Operation { }; + + return operationResult; + } + } +} diff --git a/src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs index a426be7236..27cf348397 100644 --- a/src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/Processors/ReplaceOpProcessor.cs @@ -1,11 +1,9 @@ -using System; using System.Threading.Tasks; using JsonApiDotNetCore.Builders; using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Serialization; -using Newtonsoft.Json; namespace JsonApiDotNetCore.Services.Operations.Processors { @@ -51,7 +49,6 @@ public ReplaceOpProcessor( public async Task ProcessAsync(Operation operation) { - Console.WriteLine(JsonConvert.SerializeObject(operation)); var model = (T)_deSerializer.DocumentToObject(operation.DataObject); if (string.IsNullOrWhiteSpace(operation?.DataObject?.Id?.ToString())) diff --git a/test/OperationsExampleTests/Remove/RemoveTests.cs b/test/OperationsExampleTests/Remove/RemoveTests.cs new file mode 100644 index 0000000000..f5229ebbd5 --- /dev/null +++ b/test/OperationsExampleTests/Remove/RemoveTests.cs @@ -0,0 +1,92 @@ +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using Bogus; +using JsonApiDotNetCore.Models.Operations; +using OperationsExample.Data; +using OperationsExampleTests.Factories; +using Xunit; + +namespace OperationsExampleTests +{ + [Collection("WebHostCollection")] + public class RemoveTests + { + private readonly Fixture _fixture; + private readonly Faker _faker = new Faker(); + + public RemoveTests(Fixture fixture) + { + _fixture = fixture; + } + + [Fact] + public async Task Can_Remove_Article() + { + // arrange + var context = _fixture.GetService(); + var article = ArticleFactory.Get(); + context.Articles.Add(article); + context.SaveChanges(); + + var content = new + { + operations = new[] { + new Dictionary { + { "op", "remove"}, + { "ref", new { type = "articles", id = article.StringId } } + } + } + }; + + // act + var result = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(result.response); + Assert.NotNull(result.data); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); + Assert.Equal(1, result.data.Operations.Count); + Assert.Null(context.Articles.SingleOrDefault(a => a.Id == article.Id)); + } + + [Fact] + public async Task Can_Remove_Articles() + { + // arrange + var count = _faker.Random.Int(1, 10); + var context = _fixture.GetService(); + + var articles = ArticleFactory.Get(count); + + context.Articles.AddRange(articles); + context.SaveChanges(); + + var content = new + { + operations = new List() + }; + + for (int i = 0; i < count; i++) + content.operations.Add( + new Dictionary { + { "op", "remove"}, + { "ref", new { type = "articles", id = articles[i].StringId } } + } + ); + + // act + var result = await _fixture.PatchAsync("api/bulk", content); + + // assert + Assert.NotNull(result.response); + Assert.NotNull(result.data); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); + Assert.Equal(count, result.data.Operations.Count); + + for (int i = 0; i < count; i++) + Assert.Null(context.Articles.SingleOrDefault(a => a.Id == articles[i].Id)); + } + } +} From 7e438bfea3c782859c2a1bcb22aa8c62c5adc24b Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 22 Oct 2017 22:11:00 -0500 Subject: [PATCH 26/38] wrap operations in EF transaction --- .../Internal/JsonApiException.cs | 12 +-- .../Operations/OperationsProcessor.cs | 54 +++++++++---- test/OperationsExampleTests/Add/AddTests.cs | 77 ++++++++++--------- 3 files changed, 86 insertions(+), 57 deletions(-) diff --git a/src/JsonApiDotNetCore/Internal/JsonApiException.cs b/src/JsonApiDotNetCore/Internal/JsonApiException.cs index 9ce12fe428..aa5faf3f73 100644 --- a/src/JsonApiDotNetCore/Internal/JsonApiException.cs +++ b/src/JsonApiDotNetCore/Internal/JsonApiException.cs @@ -8,7 +8,7 @@ public class JsonApiException : Exception private readonly ErrorCollection _errors = new ErrorCollection(); public JsonApiException(ErrorCollection errorCollection) - { + { _errors = errorCollection; } @@ -42,15 +42,15 @@ public JsonApiException(int statusCode, string message, Exception innerException public int GetStatusCode() { - if(_errors.Errors.Count == 1) + if (_errors.Errors.Count == 1) return _errors.Errors[0].StatusCode; - if(_errors.Errors.FirstOrDefault(e => e.StatusCode >= 500) != null) + if (_errors.Errors.FirstOrDefault(e => e.StatusCode >= 500) != null) return 500; - - if(_errors.Errors.FirstOrDefault(e => e.StatusCode >= 400) != null) + + if (_errors.Errors.FirstOrDefault(e => e.StatusCode >= 400) != null) return 400; - + return 500; } } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index 05c87dd0f7..2873d243b1 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -5,6 +5,7 @@ using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Models.Pointers; +using Microsoft.EntityFrameworkCore; namespace JsonApiDotNetCore.Services.Operations { @@ -16,35 +17,60 @@ public interface IOperationsProcessor public class OperationsProcessor : IOperationsProcessor { private readonly IOperationProcessorResolver _processorResolver; + private readonly DbContext _dbContext; - public OperationsProcessor(IOperationProcessorResolver processorResolver) + public OperationsProcessor( + IOperationProcessorResolver processorResolver, + DbContext dbContext) { _processorResolver = processorResolver; + _dbContext = dbContext; } public async Task> ProcessAsync(List inputOps) { var outputOps = new List(); - - foreach (var op in inputOps) + var opIndex = 0; + using (var transaction = await _dbContext.Database.BeginTransactionAsync()) { - // TODO: parse pointers: - // locate all objects within the document and replace them - var operationsPointer = new OperationsPointer(); - - ReplaceDataPointers(op.DataObject, outputOps); - ReplaceRefPointers(op.Ref, outputOps); - - var processor = GetOperationsProcessor(op); - var resultOp = await processor.ProcessAsync(op); + try + { + foreach (var op in inputOps) + { + await ProcessOperation(op, outputOps); + opIndex++; + } - if (resultOp != null) - outputOps.Add(resultOp); + transaction.Commit(); + } + catch (JsonApiException e) + { + outputOps = new List(); + throw new JsonApiException(e.GetStatusCode(), $"Transaction failed on operation[{opIndex}].", e); + } + catch (Exception e) + { + throw new JsonApiException(500, $"Transaction failed on operation[{opIndex}] for an unexpected reason.", e); + } } return outputOps; } + private async Task ProcessOperation(Operation op, List outputOps) + { + var operationsPointer = new OperationsPointer(); + + ReplaceDataPointers(op.DataObject, outputOps); + ReplaceRefPointers(op.Ref, outputOps); + + var processor = GetOperationsProcessor(op); + var resultOp = await processor.ProcessAsync(op); + + if (resultOp != null) + outputOps.Add(resultOp); + } + private void ReplaceDataPointers(DocumentData dataObject, List outputOps) { if (dataObject == null) return; diff --git a/test/OperationsExampleTests/Add/AddTests.cs b/test/OperationsExampleTests/Add/AddTests.cs index b42dc342f1..2d765e1633 100644 --- a/test/OperationsExampleTests/Add/AddTests.cs +++ b/test/OperationsExampleTests/Add/AddTests.cs @@ -1,7 +1,10 @@ +using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading.Tasks; +using Bogus; using JsonApiDotNetCore.Extensions; +using JsonApiDotNetCore.Models.Operations; using Microsoft.EntityFrameworkCore; using OperationsExample.Data; using OperationsExampleTests.Factories; @@ -13,6 +16,7 @@ namespace OperationsExampleTests public class AddTests { private readonly Fixture _fixture; + private readonly Faker _faker = new Faker(); public AddTests(Fixture fixture) { @@ -41,13 +45,14 @@ public async Task Can_Create_Article() }; // act - var response = await _fixture.PatchAsync("api/bulk", content); + var result = await _fixture.PatchAsync("api/bulk", content); // assert - Assert.NotNull(response); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(result); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); - var lastArticle = await context.Articles.LastAsync(); + var id = (string)result.data.Operations.Single().DataObject.Id; + var lastArticle = await context.Articles.SingleAsync(a => a.StringId == id); Assert.Equal(article.Name, lastArticle.Name); } @@ -55,48 +60,46 @@ public async Task Can_Create_Article() public async Task Can_Create_Articles() { // arrange + var expectedCount = _faker.Random.Int(1, 10); var context = _fixture.GetService(); - var articles = ArticleFactory.Get(2); + var articles = ArticleFactory.Get(expectedCount); var content = new { - operations = new[] { - new { - op = "add", - data = new { - type = "articles", - attributes = new { - name = articles[0].Name - } - } - }, - new { - op = "add", - data = new { - type = "articles", - attributes = new { - name = articles[1].Name - } - } - } - } + operations = new List() }; + for (int i = 0; i < expectedCount; i++) + { + content.operations.Add( + new + { + op = "add", + data = new + { + type = "articles", + attributes = new + { + name = articles[i].Name + } + } + } + ); + } + // act - var response = await _fixture.PatchAsync("api/bulk", content); + var result = await _fixture.PatchAsync("api/bulk", content); // assert - Assert.NotNull(response); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(result); + Assert.Equal(HttpStatusCode.OK, result.response.StatusCode); + Assert.Equal(expectedCount, result.data.Operations.Count); - var lastArticles = (await context.Articles - .OrderByDescending(d => d.Id) - .Take(2) - .ToListAsync()) - .OrderBy(l => l.Id) - .ToList(); - - Assert.Equal(articles[0].Name, lastArticles[0].Name); - Assert.Equal(articles[1].Name, lastArticles[1].Name); + for (int i = 0; i < expectedCount; i++) + { + var data = result.data.Operations[i].DataObject; + var article = context.Articles.Single(a => a.StringId == data.Id.ToString()); + Assert.Equal(articles[i].Name, article.Name); + } } } } From 2d5f2037adaf551c0be9651e1a6510fbb9e57842 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Tue, 24 Oct 2017 06:18:41 -0500 Subject: [PATCH 27/38] chore(*): bump project version and document usage --- couscous.yml | 8 +++++++- docs/Operations.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 docs/Operations.md diff --git a/couscous.yml b/couscous.yml index 87b795a1c3..2a038cf45b 100644 --- a/couscous.yml +++ b/couscous.yml @@ -110,4 +110,10 @@ menu: relativeUrl: entityrepositories.html middleware: text: Middleware - relativeUrl: middleware.html \ No newline at end of file + relativeUrl: middleware.html + extensions: + name: Spec Extensions + items: + operations: + text: Operations + relativeUrl: operations.html \ No newline at end of file diff --git a/docs/Operations.md b/docs/Operations.md new file mode 100644 index 0000000000..697f9171b2 --- /dev/null +++ b/docs/Operations.md @@ -0,0 +1,33 @@ +--- +currentMenu: operations +--- + +# Operations + +Operations is currently an unofficial proposal. It allows you to perform bulk operations in a single transaction. + +### Enabling + +To enable the operations extension, modify you `Startup.ConfigureServices` method: + +```csharp +services.AddJsonApi(opt => opt.EnableExtension(JsonApiExtension.Operations)); +``` + +### Controllers + +To create a bulk operations controller, inherit `JsonApiOperationsController`: + +```csharp +[Route("api/bulk")] +public class OperationsController : JsonApiOperationsController +{ + public OperationsController(IOperationsProcessor processor) + : base(processor) + { } +} +``` + +### Example + +There is a working example in the `/src/examples/OperationsExample` directory of the repository. \ No newline at end of file From da4620356218ad71de5078a8528ae1370de84051 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Tue, 24 Oct 2017 06:46:55 -0500 Subject: [PATCH 28/38] fix tests --- .../Operations/OperationsProcessorTests.cs | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs index fadcd3be78..74298f0cca 100644 --- a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs +++ b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs @@ -1,7 +1,11 @@ using System.Collections.Generic; +using System.Threading; using System.Threading.Tasks; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Services.Operations; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; using Moq; using Newtonsoft.Json; using Xunit; @@ -12,9 +16,12 @@ public class OperationsProcessorTests { private readonly Mock _resolverMock; + public readonly Mock _dbContextMock; + public OperationsProcessorTests() { _resolverMock = new Mock(); + _dbContextMock = new Mock(); } [Fact] @@ -61,21 +68,27 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() } } }"; - + var operations = JsonConvert.DeserializeObject>(request); var addOperationResult = JsonConvert.DeserializeObject(op1Result); + var databaseMock = new Mock(_dbContextMock.Object); + var transactionMock = new Mock(); + databaseMock.Setup(m => m.BeginTransactionAsync(It.IsAny())) + .ReturnsAsync(transactionMock.Object); + _dbContextMock.Setup(m => m.Database).Returns(databaseMock.Object); + var opProcessorMock = new Mock(); opProcessorMock.Setup(m => m.ProcessAsync(It.Is(op => op.DataObject.Type.ToString() == "authors"))) .ReturnsAsync(addOperationResult); - + _resolverMock.Setup(m => m.LocateCreateService(It.IsAny())) .Returns(opProcessorMock.Object); - + _resolverMock.Setup(m => m.LocateCreateService((It.IsAny()))) .Returns(opProcessorMock.Object); - var operationsProcessor = new OperationsProcessor(_resolverMock.Object); + var operationsProcessor = new OperationsProcessor(_resolverMock.Object, _dbContextMock.Object); // act var results = await operationsProcessor.ProcessAsync(operations); @@ -83,7 +96,7 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() // assert opProcessorMock.Verify( m => m.ProcessAsync( - It.Is(o => + It.Is(o => o.DataObject.Type.ToString() == "articles" && o.DataObject.Relationships["author"].SingleData["id"].ToString() == "9" ) From 8b54ecaa3afb4762c688a7af56652c6d0437ddd7 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 12 Nov 2017 20:31:58 -0600 Subject: [PATCH 29/38] chore(csproj): bump package version --- src/JsonApiDotNetCore/JsonApiDotNetCore.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj index a67648a417..e6429a1364 100755 --- a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj @@ -1,6 +1,6 @@  - 2.1.9 + 2.2.0 netstandard1.6 JsonApiDotNetCore JsonApiDotNetCore From bd462e38cf596433461acc2b251c1c5e2b5a12e9 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 18 Feb 2018 10:23:23 -0600 Subject: [PATCH 30/38] fix build issues and consolidate props definitions --- Directory.Build.props | 20 ++++-- benchmarks/Benchmarks.csproj | 1 - build/dependencies.props | 11 ---- .../JsonApiDotNetCoreExample.csproj | 1 - .../NoEntityFrameworkExample.csproj | 1 - .../OperationsExample.csproj | 65 +++++++++---------- .../ReportsExample/ReportsExample.csproj | 1 - .../IServiceCollectionExtensions.cs | 2 - .../Internal/Generics/GenericProcessor.cs | 2 +- .../JsonApiDotNetCore.csproj | 3 +- .../JsonApiDotNetCoreExampleTests.csproj | 1 - .../NoEntityFrameworkTests.csproj | 1 - .../OperationsExampleTests.csproj | 14 ++-- test/UnitTests/UnitTests.csproj | 1 - 14 files changed, 54 insertions(+), 70 deletions(-) delete mode 100644 build/dependencies.props diff --git a/Directory.Build.props b/Directory.Build.props index d3e19546db..cc81f65974 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,21 +1,27 @@ + netcoreapp2.0 netstandard2.0 + 2.0.1 - 2.0.1 + 2.0.0 2.0.0 + 2.0.0 + + + 2.0.1 + 2.0.1 + + 3.2.6 + 2.0.0 + 4.4.0 - netcoreapp2.0 - 2.0.0 - 2.0.0 - 3.2.6 - 2.0.1 15.3.0-preview-20170427-09 1.1.2 2.3.0-beta3-build3705 @@ -23,4 +29,4 @@ 4.7.99 - \ No newline at end of file + diff --git a/benchmarks/Benchmarks.csproj b/benchmarks/Benchmarks.csproj index b5ff121826..1e8b227f3c 100644 --- a/benchmarks/Benchmarks.csproj +++ b/benchmarks/Benchmarks.csproj @@ -1,5 +1,4 @@ - Exe $(NetCoreAppVersion) diff --git a/build/dependencies.props b/build/dependencies.props deleted file mode 100644 index 0ef1b750a7..0000000000 --- a/build/dependencies.props +++ /dev/null @@ -1,11 +0,0 @@ - - - netcoreapp2.0 - netstandard2.0 - - - 4.7.10 - 2.3.1 - 8.0.1-beta-1 - - diff --git a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj index a2981cffd1..94e2a404a9 100755 --- a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj +++ b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj @@ -1,5 +1,4 @@ - $(NetCoreAppVersion) true diff --git a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj index 32506808fe..eed5f1b09e 100755 --- a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj +++ b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj @@ -1,5 +1,4 @@  - $(NetCoreAppVersion) diff --git a/src/Examples/OperationsExample/OperationsExample.csproj b/src/Examples/OperationsExample/OperationsExample.csproj index e033989925..48c2654722 100644 --- a/src/Examples/OperationsExample/OperationsExample.csproj +++ b/src/Examples/OperationsExample/OperationsExample.csproj @@ -1,33 +1,32 @@ - - - - netcoreapp1.0 - true - OperationsExample - Exe - - - - - - - - - - - - - - - - - - - - - - - - - - + + + $(NetCoreAppVersion) + true + OperationsExample + Exe + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Examples/ReportsExample/ReportsExample.csproj b/src/Examples/ReportsExample/ReportsExample.csproj index f8f83e454c..bd4b402071 100644 --- a/src/Examples/ReportsExample/ReportsExample.csproj +++ b/src/Examples/ReportsExample/ReportsExample.csproj @@ -1,5 +1,4 @@ - $(NetCoreAppVersion) diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index e5569f4bc4..cd068ead6a 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -98,8 +98,6 @@ public static void AddJsonApiInternals( if (jsonApiOptions.EnabledExtensions.Contains(JsonApiExtension.Operations)) AddOperationServices(services); - services.AddScoped(); - services.AddScoped(typeof(IEntityRepository<>), typeof(DefaultEntityRepository<>)); services.AddScoped(typeof(IEntityRepository<,>), typeof(DefaultEntityRepository<,>)); diff --git a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs index 5f9ffaca0f..8e5d17e56b 100644 --- a/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs +++ b/src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs @@ -16,7 +16,7 @@ public interface IGenericProcessor public class GenericProcessor : GenericProcessor where T : class, IIdentifiable { - public GenericProcessor(DbContext context) : base(context) { } + public GenericProcessor(IDbContextResolver contextResolver) : base(contextResolver) { } } public class GenericProcessor : IGenericProcessor where T : class, IIdentifiable diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj index 0d16b28e65..9fe109011b 100755 --- a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj @@ -1,5 +1,4 @@  - 2.2.0 $(NetStandardVersion) @@ -23,4 +22,4 @@ - \ No newline at end of file + diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj index da92260546..90bd4050e7 100755 --- a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -1,5 +1,4 @@  - $(NetCoreAppVersion) false diff --git a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj index 5553a7c1eb..646cf9d538 100644 --- a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj +++ b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj @@ -1,5 +1,4 @@  - $(NetCoreAppVersion) true diff --git a/test/OperationsExampleTests/OperationsExampleTests.csproj b/test/OperationsExampleTests/OperationsExampleTests.csproj index 18e795cb9e..a7727475bd 100644 --- a/test/OperationsExampleTests/OperationsExampleTests.csproj +++ b/test/OperationsExampleTests/OperationsExampleTests.csproj @@ -1,16 +1,16 @@ - netcoreapp1.1 + $(NetCoreAppVersion) false OperationsExampleTests - - - - + + + + + - @@ -20,4 +20,4 @@ PreserveNewest - \ No newline at end of file + diff --git a/test/UnitTests/UnitTests.csproj b/test/UnitTests/UnitTests.csproj index 4848455eac..14a0d30e33 100644 --- a/test/UnitTests/UnitTests.csproj +++ b/test/UnitTests/UnitTests.csproj @@ -1,5 +1,4 @@ - $(NetCoreAppVersion) false From e78a3f3b6d9af0adc74bd1641760e8e41123fa74 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 18 Feb 2018 10:37:07 -0600 Subject: [PATCH 31/38] fix tests --- src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index adc3883dd3..ae7f95917b 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -177,7 +177,7 @@ private object SetHasOneRelationship(object entity, if (relationshipAttr == null) throw new JsonApiException(400, $"{_jsonApiContext.RequestEntity.EntityName} does not contain a relationship '{relationshipName}'"); - var data = (Dictionary) relationshipData.ExposedData; + var data = (Dictionary) relationshipData.ExposedData; if (data == null) return entity; From 3447bae8f960748013a9f3c8b7890bd6795f73ce Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 18 Feb 2018 16:55:49 -0600 Subject: [PATCH 32/38] feat(operations): remove JSON pointers from previous spec draft --- .../IServiceCollectionExtensions.cs | 3 - .../JsonApiOperationsInputFormatter.cs | 35 ----------- .../DocumentDataPointerReplacement.cs | 59 ------------------- .../Operations/OperationsProcessor.cs | 20 +------ .../ResourceRefPointerReplacement.cs | 34 ----------- .../WebHostCollection.cs | 13 ++-- 6 files changed, 7 insertions(+), 157 deletions(-) delete mode 100644 src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs delete mode 100644 src/JsonApiDotNetCore/Services/Operations/DocumentDataPointerReplacement.cs delete mode 100644 src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index cd068ead6a..437132f087 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -163,9 +163,6 @@ public static void SerializeAsJsonApi(this MvcOptions options, JsonApiOptions js { options.InputFormatters.Insert(0, new JsonApiInputFormatter()); - if (jsonApiOptions.EnabledExtensions.Contains(JsonApiExtension.Operations)) - options.InputFormatters.Insert(0, new JsonApiOperationsInputFormatter()); - options.OutputFormatters.Insert(0, new JsonApiOutputFormatter()); options.Conventions.Insert(0, new DasherizedRoutingConvention(jsonApiOptions.Namespace)); diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs deleted file mode 100644 index 6f114aff33..0000000000 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsInputFormatter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Primitives; - -namespace JsonApiDotNetCore.Formatters -{ - public class JsonApiOperationsInputFormatter : IInputFormatter - { - internal const string PROFILE_EXTENSION = "; rel=\"profile\""; - - public bool CanRead(InputFormatterContext context) - { - if (context == null) - throw new ArgumentNullException(nameof(context)); - - var contentTypeString = context.HttpContext.Request.ContentType; - - var canRead = ( - contentTypeString == "application/vnd.api+json" && - context.HttpContext.Request.Headers.TryGetValue("Link", out StringValues profileExtension) && - profileExtension == PROFILE_EXTENSION - ); - - return canRead; - } - - public async Task ReadAsync(InputFormatterContext context) - { - var reader = context.HttpContext.RequestServices.GetService(); - return await reader.ReadAsync(context); - } - } -} diff --git a/src/JsonApiDotNetCore/Services/Operations/DocumentDataPointerReplacement.cs b/src/JsonApiDotNetCore/Services/Operations/DocumentDataPointerReplacement.cs deleted file mode 100644 index 7301353c3e..0000000000 --- a/src/JsonApiDotNetCore/Services/Operations/DocumentDataPointerReplacement.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Collections.Generic; -using JsonApiDotNetCore.Models.Pointers; -using Newtonsoft.Json.Linq; -using JsonApiDotNetCore.Models; -using JsonApiDotNetCore.Extensions; - -namespace JsonApiDotNetCore.Services.Operations -{ - public class DocumentDataPointerReplacement - where TPointer : Pointer, new() - { - private readonly DocumentData _data; - - public DocumentDataPointerReplacement(DocumentData data) - { - _data = data; - } - - public void ReplacePointers(List parentDoc) - { - _data.Id = GetPointerValue(_data.Id, parentDoc); - _data.Type = GetPointerValue(_data.Type, parentDoc); - - if (_data.Relationships != null) - { - foreach (var relationshipDictionary in _data.Relationships) - { - if (relationshipDictionary.Value.IsHasMany) - { - foreach (var relationship in relationshipDictionary.Value.ManyData) - ReplaceDictionaryPointers(relationship, parentDoc); - } - else - { - ReplaceDictionaryPointers(relationshipDictionary.Value.SingleData, parentDoc); - } - } - } - } - - private void ReplaceDictionaryPointers(Dictionary relationship, List parentDoc) - { - if (relationship.ContainsKey("id")) - relationship["id"] = GetPointerValue(relationship["id"], parentDoc); - - if (relationship.ContainsKey("type")) - relationship["type"] = GetPointerValue(relationship["type"], parentDoc); - } - - private object GetPointerValue(object reference, List parentDoc) - { - if (reference is JObject jObj) - if (jObj.TryParse(Pointer.JsonSchema, out Pointer pointer)) - return pointer.GetValue(parentDoc); - - return reference; - } - } -} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index 2873d243b1..e49e758570 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -61,8 +61,8 @@ private async Task ProcessOperation(Operation op, List outputOps) { var operationsPointer = new OperationsPointer(); - ReplaceDataPointers(op.DataObject, outputOps); - ReplaceRefPointers(op.Ref, outputOps); + // ReplaceDataPointers(op.DataObject, outputOps); + // ReplaceRefPointers(op.Ref, outputOps); var processor = GetOperationsProcessor(op); var resultOp = await processor.ProcessAsync(op); @@ -71,22 +71,6 @@ private async Task ProcessOperation(Operation op, List outputOps) outputOps.Add(resultOp); } - private void ReplaceDataPointers(DocumentData dataObject, List outputOps) - { - if (dataObject == null) return; - - var replacer = new DocumentDataPointerReplacement(dataObject); - replacer.ReplacePointers(outputOps); - } - - private void ReplaceRefPointers(ResourceReference resourceRef, List outputOps) - { - if (resourceRef == null) return; - - var replacer = new ResourceRefPointerReplacement(resourceRef); - replacer.ReplacePointers(outputOps); - } - private IOpProcessor GetOperationsProcessor(Operation op) { switch (op.Op) diff --git a/src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs b/src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs deleted file mode 100644 index d24d7e879a..0000000000 --- a/src/JsonApiDotNetCore/Services/Operations/ResourceRefPointerReplacement.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Collections.Generic; -using JsonApiDotNetCore.Models.Pointers; -using Newtonsoft.Json.Linq; -using JsonApiDotNetCore.Extensions; -using JsonApiDotNetCore.Models.Operations; - -namespace JsonApiDotNetCore.Services.Operations -{ - public class ResourceRefPointerReplacement - where TPointer : Pointer, new() - { - private readonly ResourceReference _ref; - - public ResourceRefPointerReplacement(ResourceReference data) - { - _ref = data; - } - - public void ReplacePointers(List parentDoc) - { - _ref.Id = GetPointerValue(_ref.Id, parentDoc); - _ref.Type = GetPointerValue(_ref.Type, parentDoc); - } - - private object GetPointerValue(object reference, List parentDoc) - { - if (reference is JObject jObj) - if (jObj.TryParse(Pointer.JsonSchema, out Pointer pointer)) - return pointer.GetValue(parentDoc); - - return reference; - } - } -} \ No newline at end of file diff --git a/test/OperationsExampleTests/WebHostCollection.cs b/test/OperationsExampleTests/WebHostCollection.cs index dc4f02a58c..e385ace992 100644 --- a/test/OperationsExampleTests/WebHostCollection.cs +++ b/test/OperationsExampleTests/WebHostCollection.cs @@ -1,13 +1,11 @@ -using System; using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; -using OperationsExample; -using Xunit; using Microsoft.AspNetCore.TestHost; using Newtonsoft.Json; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using JsonApiDotNetCore.Formatters; +using OperationsExample; +using Xunit; namespace OperationsExampleTests { @@ -35,7 +33,6 @@ public async Task PatchAsync(string route, object data) request.Content = new StringContent(JsonConvert.SerializeObject(data)); request.Content.Headers.ContentLength = 1; request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.api+json"); - request.Content.Headers.Add("Link", JsonApiOperationsInputFormatter.PROFILE_EXTENSION); return await Client.SendAsync(request); } @@ -47,4 +44,4 @@ public async Task PatchAsync(string route, object data) return (response, obj); } } -} \ No newline at end of file +} From 820b2dc62ebc8b9f57210881babf5a922c8fbf3e Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 18 Feb 2018 16:57:25 -0600 Subject: [PATCH 33/38] breaking(Document): introduce RO and RIO from spec DocumentData becomes ResourceObject and dictionary in Relationship becomes strongly type ResourceIdentifierObject --- .../Builders/DocumentBuilder.cs | 20 +++++----- src/JsonApiDotNetCore/Models/DocumentData.cs | 21 ++-------- .../Models/RelationshipData.cs | 15 ++++---- .../Models/ResourceIdentifierObject.cs | 16 ++++++++ .../Models/ResourceObject.cs | 14 +++++++ .../Serialization/JsonApiDeSerializer.cs | 4 +- .../UnitTests/Models/RelationshipDataTests.cs | 38 +++++++++++-------- .../Operations/OperationsProcessorTests.cs | 2 +- 8 files changed, 77 insertions(+), 53 deletions(-) create mode 100644 src/JsonApiDotNetCore/Models/ResourceIdentifierObject.cs create mode 100644 src/JsonApiDotNetCore/Models/ResourceObject.cs diff --git a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs index 95227abd58..0e43225b35 100644 --- a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs +++ b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs @@ -234,32 +234,32 @@ private bool RelationshipIsIncluded(string relationshipName) _jsonApiContext.IncludedRelationships.Contains(relationshipName); } - private List> GetRelationships(IEnumerable entities) + private List GetRelationships(IEnumerable entities) { var objType = entities.GetElementType(); var typeName = _jsonApiContext.ContextGraph.GetContextEntity(objType); - var relationships = new List>(); + var relationships = new List(); foreach (var entity in entities) { - relationships.Add(new Dictionary { - {"type", typeName.EntityName }, - {"id", ((IIdentifiable)entity).StringId } + relationships.Add(new ResourceIdentifierObject { + Type = typeName.EntityName, + Id = ((IIdentifiable)entity).StringId }); } return relationships; } - private Dictionary GetRelationship(object entity) + private ResourceIdentifierObject GetRelationship(object entity) { var objType = entity.GetType(); var typeName = _jsonApiContext.ContextGraph.GetContextEntity(objType); - return new Dictionary { - {"type", typeName.EntityName }, - {"id", ((IIdentifiable)entity).StringId } - }; + return new ResourceIdentifierObject { + Type = typeName.EntityName, + Id = ((IIdentifiable)entity).StringId + }; } } } diff --git a/src/JsonApiDotNetCore/Models/DocumentData.cs b/src/JsonApiDotNetCore/Models/DocumentData.cs index 7b5bdadd5b..ba1ce646c0 100644 --- a/src/JsonApiDotNetCore/Models/DocumentData.cs +++ b/src/JsonApiDotNetCore/Models/DocumentData.cs @@ -1,20 +1,5 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - namespace JsonApiDotNetCore.Models { - public class DocumentData - { - [JsonProperty("type")] - public object Type { get; set; } - - [JsonProperty("id")] - public object Id { get; set; } - - [JsonProperty("attributes")] - public Dictionary Attributes { get; set; } - - [JsonProperty("relationships", NullValueHandling = NullValueHandling.Ignore)] - public Dictionary Relationships { get; set; } - } -} \ No newline at end of file + // TODO: deprecate DocumentData in favor of ResourceObject + public class DocumentData : ResourceObject { } +} diff --git a/src/JsonApiDotNetCore/Models/RelationshipData.cs b/src/JsonApiDotNetCore/Models/RelationshipData.cs index d81b2fe75a..1cfe47c5c7 100644 --- a/src/JsonApiDotNetCore/Models/RelationshipData.cs +++ b/src/JsonApiDotNetCore/Models/RelationshipData.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -22,9 +21,9 @@ public object ExposedData set { if (value is JObject jObject) - SingleData = jObject.ToObject>(); - else if (value is Dictionary dict) - SingleData = (Dictionary)value; + SingleData = jObject.ToObject(); + else if (value is ResourceIdentifierObject dict) + SingleData = (ResourceIdentifierObject)value; else SetManyData(value); } @@ -34,16 +33,16 @@ private void SetManyData(object value) { IsHasMany = true; if (value is JArray jArray) - ManyData = jArray.ToObject>>(); + ManyData = jArray.ToObject>(); else - ManyData = (List>)value; + ManyData = (List)value; } [JsonIgnore] - public List> ManyData { get; set; } + public List ManyData { get; set; } [JsonIgnore] - public Dictionary SingleData { get; set; } + public ResourceIdentifierObject SingleData { get; set; } [JsonIgnore] public bool IsHasMany { get; private set; } diff --git a/src/JsonApiDotNetCore/Models/ResourceIdentifierObject.cs b/src/JsonApiDotNetCore/Models/ResourceIdentifierObject.cs new file mode 100644 index 0000000000..1ebab6c474 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/ResourceIdentifierObject.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; + +namespace JsonApiDotNetCore.Models +{ + public class ResourceIdentifierObject + { + [JsonProperty("type")] + public string Type { get; set; } + + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("lid")] + public string LocalId { get; set; } + } +} diff --git a/src/JsonApiDotNetCore/Models/ResourceObject.cs b/src/JsonApiDotNetCore/Models/ResourceObject.cs new file mode 100644 index 0000000000..1a28631407 --- /dev/null +++ b/src/JsonApiDotNetCore/Models/ResourceObject.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace JsonApiDotNetCore.Models +{ + public class ResourceObject : ResourceIdentifierObject + { + [JsonProperty("attributes")] + public Dictionary Attributes { get; set; } + + [JsonProperty("relationships", NullValueHandling = NullValueHandling.Ignore)] + public Dictionary Relationships { get; set; } + } +} diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index ae7f95917b..1765687c0a 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -218,7 +218,9 @@ private object SetHasManyRelationship(object entity, if (data == null) return entity; var genericProcessor = _genericProcessorFactory.GetProcessor(typeof(GenericProcessor<>), attr.Type); - var ids = relationshipData.ManyData.Select(r => r["id"].ToString()); + + var ids = relationshipData.ManyData.Select(r => r.Id); + genericProcessor.SetRelationships(entity, attr, ids); } diff --git a/test/UnitTests/Models/RelationshipDataTests.cs b/test/UnitTests/Models/RelationshipDataTests.cs index 780a5faa0b..ff00144b62 100644 --- a/test/UnitTests/Models/RelationshipDataTests.cs +++ b/test/UnitTests/Models/RelationshipDataTests.cs @@ -1,7 +1,7 @@ -using JsonApiDotNetCore.Models; -using System.Collections.Generic; -using Xunit; +using System.Collections.Generic; +using JsonApiDotNetCore.Models; using Newtonsoft.Json.Linq; +using Xunit; namespace UnitTests.Models { @@ -12,9 +12,10 @@ public void Setting_ExposedData_To_List_Sets_ManyData() { // arrange var relationshipData = new RelationshipData(); - var relationships = new List> { - new Dictionary { - { "authors", new { } } + var relationships = new List { + new ResourceIdentifierObject { + Id = "9", + Type = "authors" } }; @@ -23,7 +24,8 @@ public void Setting_ExposedData_To_List_Sets_ManyData() // assert Assert.NotEmpty(relationshipData.ManyData); - Assert.True(relationshipData.ManyData[0].ContainsKey("authors")); + Assert.Equal("authors", relationshipData.ManyData[0].Type); + Assert.Equal("9", relationshipData.ManyData[0].Id); Assert.True(relationshipData.IsHasMany); } @@ -34,7 +36,8 @@ public void Setting_ExposedData_To_JArray_Sets_ManyData() var relationshipData = new RelationshipData(); var relationshipsJson = @"[ { - ""authors"": {} + ""type"": ""authors"", + ""id"": ""9"" } ]"; @@ -45,17 +48,19 @@ public void Setting_ExposedData_To_JArray_Sets_ManyData() // assert Assert.NotEmpty(relationshipData.ManyData); - Assert.True(relationshipData.ManyData[0].ContainsKey("authors")); + Assert.Equal("authors", relationshipData.ManyData[0].Type); + Assert.Equal("9", relationshipData.ManyData[0].Id); Assert.True(relationshipData.IsHasMany); } [Fact] - public void Setting_ExposedData_To_Dictionary_Sets_SingleData() + public void Setting_ExposedData_To_RIO_Sets_SingleData() { // arrange var relationshipData = new RelationshipData(); - var relationship = new Dictionary { - { "authors", new { } } + var relationship = new ResourceIdentifierObject { + Id = "9", + Type = "authors" }; // act @@ -63,7 +68,8 @@ public void Setting_ExposedData_To_Dictionary_Sets_SingleData() // assert Assert.NotNull(relationshipData.SingleData); - Assert.True(relationshipData.SingleData.ContainsKey("authors")); + Assert.Equal("authors", relationshipData.SingleData.Type); + Assert.Equal("9", relationshipData.SingleData.Id); Assert.False(relationshipData.IsHasMany); } @@ -73,7 +79,8 @@ public void Setting_ExposedData_To_JObject_Sets_SingleData() // arrange var relationshipData = new RelationshipData(); var relationshipJson = @"{ - ""authors"": {} + ""id"": ""9"", + ""type"": ""authors"" }"; var relationship = JObject.Parse(relationshipJson); @@ -83,7 +90,8 @@ public void Setting_ExposedData_To_JObject_Sets_SingleData() // assert Assert.NotNull(relationshipData.SingleData); - Assert.True(relationshipData.SingleData.ContainsKey("authors")); + Assert.Equal("authors", relationshipData.SingleData.Type); + Assert.Equal("9", relationshipData.SingleData.Id); Assert.False(relationshipData.IsHasMany); } } diff --git a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs index 74298f0cca..fb098d3f78 100644 --- a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs +++ b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs @@ -98,7 +98,7 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() m => m.ProcessAsync( It.Is(o => o.DataObject.Type.ToString() == "articles" - && o.DataObject.Relationships["author"].SingleData["id"].ToString() == "9" + && o.DataObject.Relationships["author"].SingleData.Id == "9" ) ) ); From 6ff299cdf3a690ca48c1260a89549e33903fdae4 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Sun, 18 Feb 2018 17:26:09 -0600 Subject: [PATCH 34/38] fix standad tests --- .../Serialization/JsonApiDeSerializer.cs | 8 +- test/JsonApiDotNetCoreExampleTests/results | 19364 ++++++++++++++++ .../Serialization/JsonApiSerializerTests.cs | 8 +- 3 files changed, 19370 insertions(+), 10 deletions(-) create mode 100644 test/JsonApiDotNetCoreExampleTests/results diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index 1765687c0a..ef7938dbd3 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -177,11 +177,11 @@ private object SetHasOneRelationship(object entity, if (relationshipAttr == null) throw new JsonApiException(400, $"{_jsonApiContext.RequestEntity.EntityName} does not contain a relationship '{relationshipName}'"); - var data = (Dictionary) relationshipData.ExposedData; + var rio = (ResourceIdentifierObject) relationshipData.ExposedData; - if (data == null) return entity; + if (rio == null) return entity; - var newValue = data["id"]; + var newValue = rio.Id; var foreignKey = attr.InternalRelationshipName + "Id"; var entityProperty = entityProperties.FirstOrDefault(p => p.Name == foreignKey); @@ -213,7 +213,7 @@ private object SetHasManyRelationship(object entity, if (relationships.TryGetValue(relationshipName, out RelationshipData relationshipData)) { - var data = (List>)relationshipData.ExposedData; + var data = (List)relationshipData.ExposedData; if (data == null) return entity; diff --git a/test/JsonApiDotNetCoreExampleTests/results b/test/JsonApiDotNetCoreExampleTests/results new file mode 100644 index 0000000000..09e896913c --- /dev/null +++ b/test/JsonApiDotNetCoreExampleTests/results @@ -0,0 +1,19364 @@ +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/UnitTests/Serialization/JsonApiSerializerTests.cs b/test/UnitTests/Serialization/JsonApiSerializerTests.cs index 3630cd6452..8a67b80434 100644 --- a/test/UnitTests/Serialization/JsonApiSerializerTests.cs +++ b/test/UnitTests/Serialization/JsonApiSerializerTests.cs @@ -1,14 +1,10 @@ -using System.Collections.Generic; -using JsonApiDotNetCore.Builders; +using JsonApiDotNetCore.Builders; using JsonApiDotNetCore.Configuration; using JsonApiDotNetCore.Internal; -using JsonApiDotNetCore.Internal.Generics; using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Serialization; using JsonApiDotNetCore.Services; using Moq; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; using Xunit; namespace UnitTests.Serialization @@ -47,7 +43,7 @@ public void Can_Serialize_Complex_Types() // assert Assert.NotNull(result); - Assert.Equal("{\"data\":{\"type\":\"test-resource\",\"id\":\"\",\"attributes\":{\"complex-member\":{\"compound-name\":\"testname\"}}}}", result); + Assert.Equal("{\"data\":{\"attributes\":{\"complex-member\":{\"compound-name\":\"testname\"}},\"type\":\"test-resource\",\"id\":\"\"}}", result); } private class TestResource : Identifiable From 6fd2f292ff5351c12c94a23752325198cd39a8f4 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 1 Mar 2018 06:04:36 -0600 Subject: [PATCH 35/38] fix(deserialization): deserialize operations document --- .../IServiceCollectionExtensions.cs | 1 - .../Formatters/JsonApiOperationsReader.cs | 43 ------------------- .../Formatters/JsonApiReader.cs | 3 +- .../Serialization/JsonApiDeSerializer.cs | 18 +++++++- .../Operations/OperationsProcessor.cs | 6 +-- 5 files changed, 21 insertions(+), 50 deletions(-) delete mode 100644 src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs diff --git a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs index 437132f087..1f2a71e20b 100644 --- a/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs +++ b/src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs @@ -129,7 +129,6 @@ public static void AddJsonApiInternals( services.AddScoped(); services.AddScoped(); services.AddScoped(); - services.AddScoped(); services.AddScoped(); services.AddScoped(typeof(GenericProcessor<>)); services.AddScoped(typeof(GenericProcessor<,>)); diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs b/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs deleted file mode 100644 index 912cac2fff..0000000000 --- a/src/JsonApiDotNetCore/Formatters/JsonApiOperationsReader.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.IO; -using System.Threading.Tasks; -using JsonApiDotNetCore.Internal; -using JsonApiDotNetCore.Models.Operations; -using Microsoft.AspNetCore.Mvc.Formatters; -using Newtonsoft.Json; - -namespace JsonApiDotNetCore.Formatters -{ - public interface IJsonApiOperationsReader - { - Task ReadAsync(InputFormatterContext context); - } - - public class JsonApiOperationsReader : IJsonApiOperationsReader - { - public Task ReadAsync(InputFormatterContext context) - { - if (context == null) - throw new ArgumentNullException(nameof(context)); - - var request = context.HttpContext.Request; - if (request.ContentLength == null || request.ContentLength == 0) - throw new JsonApiException(400, "Content-Length cannot be empty."); - - var body = GetRequestBody(request.Body); - - var operations = JsonConvert.DeserializeObject(body); - - if (operations == null) - throw new JsonApiException(400, "Failed to deserialize operations request."); - - return InputFormatterResult.SuccessAsync(operations); - } - - private string GetRequestBody(Stream body) - { - using (var reader = new StreamReader(body)) - return reader.ReadToEnd(); - } - } -} \ No newline at end of file diff --git a/src/JsonApiDotNetCore/Formatters/JsonApiReader.cs b/src/JsonApiDotNetCore/Formatters/JsonApiReader.cs index 274d14bc15..204f3e0491 100644 --- a/src/JsonApiDotNetCore/Formatters/JsonApiReader.cs +++ b/src/JsonApiDotNetCore/Formatters/JsonApiReader.cs @@ -36,6 +36,7 @@ public Task ReadAsync(InputFormatterContext context) try { var body = GetRequestBody(context.HttpContext.Request.Body); + var model = _jsonApiContext.IsRelationshipPath ? _deSerializer.DeserializeRelationship(body) : _deSerializer.Deserialize(body); @@ -67,4 +68,4 @@ private string GetRequestBody(Stream body) } } } -} \ No newline at end of file +} diff --git a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs index ef7938dbd3..a32a40c5d4 100644 --- a/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs +++ b/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs @@ -5,6 +5,7 @@ using JsonApiDotNetCore.Internal; using JsonApiDotNetCore.Internal.Generics; using JsonApiDotNetCore.Models; +using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Services; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -28,7 +29,20 @@ public object Deserialize(string requestBody) { try { - var document = JsonConvert.DeserializeObject(requestBody); + // TODO: determine whether or not the token should be re-used rather than performing full + // deserialization again from the string + var bodyJToken = JToken.Parse(requestBody); + if(bodyJToken.SelectToken("operations") != null) + { + var operations = JsonConvert.DeserializeObject(requestBody); + if (operations == null) + throw new JsonApiException(400, "Failed to deserialize operations request."); + + return operations; + } + + var document = bodyJToken.ToObject(); + _jsonApiContext.DocumentMeta = document.Meta; var entity = DocumentToObject(document.Data); return entity; @@ -63,7 +77,7 @@ public List DeserializeList(string requestBody) try { var documents = JsonConvert.DeserializeObject(requestBody); - + var deserializedList = new List(); foreach (var data in documents.Data) { diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index e49e758570..a0ab3f2d65 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using JsonApiDotNetCore.Data; using JsonApiDotNetCore.Internal; -using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Models.Pointers; using Microsoft.EntityFrameworkCore; @@ -21,10 +21,10 @@ public class OperationsProcessor : IOperationsProcessor public OperationsProcessor( IOperationProcessorResolver processorResolver, - DbContext dbContext) + IDbContextResolver dbContextResolver) { _processorResolver = processorResolver; - _dbContext = dbContext; + _dbContext = dbContextResolver.GetContext(); } public async Task> ProcessAsync(List inputOps) From 31a1e8bf7addf8198134ebaca4d8db40d9c5b49f Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 1 Mar 2018 06:10:31 -0600 Subject: [PATCH 36/38] test(operations): use dbcontext resolver --- .../Services/Operations/OperationsProcessorTests.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs index fb098d3f78..c8d739104b 100644 --- a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs +++ b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using JsonApiDotNetCore.Data; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Services.Operations; using Microsoft.EntityFrameworkCore; @@ -15,13 +16,15 @@ namespace UnitTests.Services public class OperationsProcessorTests { private readonly Mock _resolverMock; - public readonly Mock _dbContextMock; + public readonly Mock _dbContextResolverMock; public OperationsProcessorTests() { _resolverMock = new Mock(); _dbContextMock = new Mock(); + _dbContextResolverMock = new Mock(); + _dbContextResolverMock.Setup(m => m.GetContext()).Returns(_dbContextMock.Object); } [Fact] @@ -88,7 +91,7 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() _resolverMock.Setup(m => m.LocateCreateService((It.IsAny()))) .Returns(opProcessorMock.Object); - var operationsProcessor = new OperationsProcessor(_resolverMock.Object, _dbContextMock.Object); + var operationsProcessor = new OperationsProcessor(_resolverMock.Object, _dbContextResolverMock.Object); // act var results = await operationsProcessor.ProcessAsync(operations); From 770aea82bc1613c5b35d7b77c0c743b7566c0be6 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Thu, 1 Mar 2018 06:35:32 -0600 Subject: [PATCH 37/38] use local ids instead of JsonPointers --- .../Operations/OperationsProcessor.cs | 41 ++++++++++++++++++- .../Operations/OperationsProcessorTests.cs | 6 ++- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index a0ab3f2d65..cefcd2ebca 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using JsonApiDotNetCore.Data; using JsonApiDotNetCore.Internal; +using JsonApiDotNetCore.Models; using JsonApiDotNetCore.Models.Operations; using JsonApiDotNetCore.Models.Pointers; using Microsoft.EntityFrameworkCore; @@ -61,7 +63,7 @@ private async Task ProcessOperation(Operation op, List outputOps) { var operationsPointer = new OperationsPointer(); - // ReplaceDataPointers(op.DataObject, outputOps); + ReplaceDataPointers(op.DataObject, outputOps); // ReplaceRefPointers(op.Ref, outputOps); var processor = GetOperationsProcessor(op); @@ -71,6 +73,43 @@ private async Task ProcessOperation(Operation op, List outputOps) outputOps.Add(resultOp); } + private void ReplaceDataPointers(DocumentData data, List outputOps) + { + if (data == null) return; + + bool HasLocalId(ResourceIdentifierObject rio) => string.IsNullOrEmpty(rio.LocalId) == false; + string GetIdFromLocalId(string localId) { + var referencedOp = outputOps.FirstOrDefault(o => o.DataObject.LocalId == localId); + if(referencedOp == null) throw new JsonApiException(400, $"Could not locate lid '{localId}' in document."); + return referencedOp.DataObject.Id; + }; + + // are there any circumstances where the primary data would contain an lid? + // if(HasLocalId(data)) + // { + // data.Id = GetIdFromLocalId(data.LocalId); + // } + + if (data.Relationships != null) + { + foreach (var relationshipDictionary in data.Relationships) + { + if (relationshipDictionary.Value.IsHasMany) + { + foreach (var relationship in relationshipDictionary.Value.ManyData) + if(HasLocalId(relationship)) + relationship.Id = GetIdFromLocalId(relationship.LocalId); + } + else + { + var relationship = relationshipDictionary.Value.SingleData; + if(HasLocalId(relationship)) + relationship.Id = GetIdFromLocalId(relationship.LocalId); + } + } + } + } + private IOpProcessor GetOperationsProcessor(Operation op) { switch (op.Op) diff --git a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs index c8d739104b..04272d25b3 100644 --- a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs +++ b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs @@ -24,7 +24,6 @@ public OperationsProcessorTests() _resolverMock = new Mock(); _dbContextMock = new Mock(); _dbContextResolverMock = new Mock(); - _dbContextResolverMock.Setup(m => m.GetContext()).Returns(_dbContextMock.Object); } [Fact] @@ -36,6 +35,7 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() ""op"": ""add"", ""data"": { ""type"": ""authors"", + ""lid"": ""a"", ""attributes"": { ""name"": ""dgeb"" } @@ -51,7 +51,7 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() ""author"": { ""data"": { ""type"": ""authors"", - ""id"": { ""pointer"": ""/operations/0/data/id"" } + ""lid"": ""a"" } } } @@ -66,6 +66,7 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() ""data"": { ""type"": ""authors"", ""id"": ""9"", + ""lid"": ""a"", ""attributes"": { ""name"": ""dgeb"" } @@ -91,6 +92,7 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() _resolverMock.Setup(m => m.LocateCreateService((It.IsAny()))) .Returns(opProcessorMock.Object); + _dbContextResolverMock.Setup(m => m.GetContext()).Returns(_dbContextMock.Object); var operationsProcessor = new OperationsProcessor(_resolverMock.Object, _dbContextResolverMock.Object); // act From 92aa732f7685647d958c75a32543b9abae9d7295 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Fri, 2 Mar 2018 07:17:02 -0600 Subject: [PATCH 38/38] replace ref.lid with results ids --- .../Models/Operations/ResourceReference.cs | 8 +- .../Operations/OperationsProcessor.cs | 58 +++++++----- .../Operations/OperationsProcessorTests.cs | 90 ++++++++++++++++++- 3 files changed, 123 insertions(+), 33 deletions(-) diff --git a/src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs b/src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs index a8caa7ca05..5291d61a19 100644 --- a/src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs +++ b/src/JsonApiDotNetCore/Models/Operations/ResourceReference.cs @@ -2,14 +2,8 @@ namespace JsonApiDotNetCore.Models.Operations { - public class ResourceReference + public class ResourceReference : ResourceIdentifierObject { - [JsonProperty("type")] - public object Type { get; set; } - - [JsonProperty("id")] - public object Id { get; set; } - [JsonProperty("relationship")] public string Relationship { get; set; } } diff --git a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs index cefcd2ebca..b687f1498f 100644 --- a/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs +++ b/src/JsonApiDotNetCore/Services/Operations/OperationsProcessor.cs @@ -33,6 +33,7 @@ public async Task> ProcessAsync(List inputOps) { var outputOps = new List(); var opIndex = 0; + using (var transaction = await _dbContext.Database.BeginTransactionAsync()) { try @@ -63,8 +64,8 @@ private async Task ProcessOperation(Operation op, List outputOps) { var operationsPointer = new OperationsPointer(); - ReplaceDataPointers(op.DataObject, outputOps); - // ReplaceRefPointers(op.Ref, outputOps); + ReplaceLocalIdsInResourceObject(op.DataObject, outputOps); + ReplaceLocalIdsInRef(op.Ref, outputOps); var processor = GetOperationsProcessor(op); var resultOp = await processor.ProcessAsync(op); @@ -73,43 +74,56 @@ private async Task ProcessOperation(Operation op, List outputOps) outputOps.Add(resultOp); } - private void ReplaceDataPointers(DocumentData data, List outputOps) + private void ReplaceLocalIdsInResourceObject(ResourceObject resourceObject, List outputOps) { - if (data == null) return; - - bool HasLocalId(ResourceIdentifierObject rio) => string.IsNullOrEmpty(rio.LocalId) == false; - string GetIdFromLocalId(string localId) { - var referencedOp = outputOps.FirstOrDefault(o => o.DataObject.LocalId == localId); - if(referencedOp == null) throw new JsonApiException(400, $"Could not locate lid '{localId}' in document."); - return referencedOp.DataObject.Id; - }; - - // are there any circumstances where the primary data would contain an lid? - // if(HasLocalId(data)) - // { - // data.Id = GetIdFromLocalId(data.LocalId); - // } - - if (data.Relationships != null) + if (resourceObject == null) return; + + // it is strange to me that a top level resource object might use a lid. + // by not replacing it, we avoid a case where the first operation is an 'add' with an 'lid' + // and we would be unable to locate the matching 'lid' in 'outputOps' + // + // we also create a scenario where I might try to update a resource I just created + // in this case, the 'data.id' will be null, but the 'ref.id' will be replaced by the correct 'id' from 'outputOps' + // + // if(HasLocalId(resourceObject)) + // resourceObject.Id = GetIdFromLocalId(outputOps, resourceObject.LocalId); + + if (resourceObject.Relationships != null) { - foreach (var relationshipDictionary in data.Relationships) + foreach (var relationshipDictionary in resourceObject.Relationships) { if (relationshipDictionary.Value.IsHasMany) { foreach (var relationship in relationshipDictionary.Value.ManyData) if(HasLocalId(relationship)) - relationship.Id = GetIdFromLocalId(relationship.LocalId); + relationship.Id = GetIdFromLocalId(outputOps, relationship.LocalId); } else { var relationship = relationshipDictionary.Value.SingleData; if(HasLocalId(relationship)) - relationship.Id = GetIdFromLocalId(relationship.LocalId); + relationship.Id = GetIdFromLocalId(outputOps, relationship.LocalId); } } } } + private void ReplaceLocalIdsInRef(ResourceReference resourceRef, List outputOps) + { + if (resourceRef == null) return; + if(HasLocalId(resourceRef)) + resourceRef.Id = GetIdFromLocalId(outputOps, resourceRef.LocalId); + } + + private bool HasLocalId(ResourceIdentifierObject rio) => string.IsNullOrEmpty(rio.LocalId) == false; + + private string GetIdFromLocalId(List outputOps, string localId) + { + var referencedOp = outputOps.FirstOrDefault(o => o.DataObject.LocalId == localId); + if(referencedOp == null) throw new JsonApiException(400, $"Could not locate lid '{localId}' in document."); + return referencedOp.DataObject.Id; + } + private IOpProcessor GetOperationsProcessor(Operation op) { switch (op.Op) diff --git a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs index 04272d25b3..0a7fd501ae 100644 --- a/test/UnitTests/Services/Operations/OperationsProcessorTests.cs +++ b/test/UnitTests/Services/Operations/OperationsProcessorTests.cs @@ -27,7 +27,7 @@ public OperationsProcessorTests() } [Fact] - public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() + public async Task ProcessAsync_Performs_LocalId_ReplacementAsync_In_Relationships() { // arrange var request = @"[ @@ -89,9 +89,6 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() _resolverMock.Setup(m => m.LocateCreateService(It.IsAny())) .Returns(opProcessorMock.Object); - _resolverMock.Setup(m => m.LocateCreateService((It.IsAny()))) - .Returns(opProcessorMock.Object); - _dbContextResolverMock.Setup(m => m.GetContext()).Returns(_dbContextMock.Object); var operationsProcessor = new OperationsProcessor(_resolverMock.Object, _dbContextResolverMock.Object); @@ -108,5 +105,90 @@ public async Task ProcessAsync_Performs_Pointer_ReplacementAsync() ) ); } + + [Fact] + public async Task ProcessAsync_Performs_LocalId_ReplacementAsync_In_References() + { + // arrange + var request = @"[ + { + ""op"": ""add"", + ""data"": { + ""type"": ""authors"", + ""lid"": ""a"", + ""attributes"": { + ""name"": ""jaredcnance"" + } + } + }, { + ""op"": ""replace"", + ""ref"": { + ""type"": ""authors"", + ""lid"": ""a"" + }, + ""data"": { + ""type"": ""authors"", + ""lid"": ""a"", + ""attributes"": { + ""name"": ""jnance"" + } + } + } + ]"; + + var op1Result = @"{ + ""data"": { + ""type"": ""authors"", + ""id"": ""9"", + ""lid"": ""a"", + ""attributes"": { + ""name"": ""jaredcnance"" + } + } + }"; + + var operations = JsonConvert.DeserializeObject>(request); + var addOperationResult = JsonConvert.DeserializeObject(op1Result); + + var databaseMock = new Mock(_dbContextMock.Object); + var transactionMock = new Mock(); + + databaseMock.Setup(m => m.BeginTransactionAsync(It.IsAny())) + .ReturnsAsync(transactionMock.Object); + + _dbContextMock.Setup(m => m.Database).Returns(databaseMock.Object); + + // setup add + var addOpProcessorMock = new Mock(); + addOpProcessorMock.Setup(m => m.ProcessAsync(It.Is(op => op.DataObject.Type.ToString() == "authors"))) + .ReturnsAsync(addOperationResult); + _resolverMock.Setup(m => m.LocateCreateService(It.IsAny())) + .Returns(addOpProcessorMock.Object); + + // setup update + var updateOpProcessorMock = new Mock(); + updateOpProcessorMock.Setup(m => m.ProcessAsync(It.Is(op => op.DataObject.Type.ToString() == "authors"))) + .ReturnsAsync((Operation)null); + _resolverMock.Setup(m => m.LocateReplaceService(It.IsAny())) + .Returns(updateOpProcessorMock.Object); + + _dbContextResolverMock.Setup(m => m.GetContext()).Returns(_dbContextMock.Object); + var operationsProcessor = new OperationsProcessor(_resolverMock.Object, _dbContextResolverMock.Object); + + // act + var results = await operationsProcessor.ProcessAsync(operations); + + // assert + updateOpProcessorMock.Verify( + m => m.ProcessAsync( + It.Is(o => + o.DataObject.Type.ToString() == "authors" + // && o.DataObject.Id == "9" // currently, we will not replace the data.id member + && o.DataObject.Id == null + && o.Ref.Id == "9" + ) + ) + ); + } } }