Hello,
I'm trying to create a rest service using the AFT Repository (2.0.2.4) and everything works as expected until I save the context when I get the error below.
What I am missing?
Thanks,
Jose
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type ATF.Repository.Providers.ResponseStatus. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'responseStatus.ErrorCode', line 1, position 31.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at ATF.Repository.Providers.RemoteDataProvider.BatchExecute(List`1 queries)
at ATF.Repository.AppDataContext.Save()
at C2C.CreatioDataIntegration.AppealDocumentManagement.Save() in C:\tfs\C2C_QLS\QLS\CreatioDataIntegration\CreatioDataIntegration\AppealDocumentManagement.cs:line 71
at C2C.CreatioDataIntegration.AppealDocumentManagement.Add(AppealDocumentRequest request) in C:\tfs\C2C_QLS\QLS\CreatioDataIntegration\CreatioDataIntegration\AppealDocumentManagement.cs:line 65
at Program.<>c.<<$>b__0_2>d.MoveNext() in C:\tfs\C2C_QLS\QLS\CreatioDataIntegration\CreatioDataIntegration\Program.cs:line 61
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Http.RequestDelegateFactory.ExecuteTaskResult[T](Task`1 task, HttpContext httpContext)
at Microsoft.AspNetCore.Http.RequestDelegateFactory.<>c__DisplayClass102_2.<b__2>d.MoveNext()
--- End of stack trace from previous location ---
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)