Hello,
I started to work in PowerBuilder 2019 R3 working on the example https://docs.appeon.com/dwconverter2019r3/CRUD_Operations_with_.NET_DataStore/index.html#introduction CRUD Operations with .NET DataStore, I did all step until the test the Retrieve()
method in the SampleController.
Even, I reviewed many times all step to try to find what is going on because I got the following error:
System.Collections.Generic.KeyNotFoundException: No metadata for DataWindow 'd_department' found
at DWNet.Data.DwModelManager.GetDwModelType(String name)
at DWNet.Data.DataSourceFactory.Create(IDataStoreBase dataStore, String dataObject, DataContext context)
at DWNet.Data.DataStoreBase.CreateDataSource(String name, Type modelType, IDwMeta dwMeta, DataContext context)
at DWNet.Data.DataStoreBase.OnInitializeSource(String name, Type modelType, IDwMeta dwMeta, DataContext context)
at DWNet.Data.DataStoreBase..ctor(String name)
at DWNet.Data.DataStore..ctor(String dataObject)
at WebAPI2.Controllers.SampleController.Retrieve() in C:\Users\ognaranjo\source\repos\WebAPI2\WebAPI2\Controllers\SampleController.cs:line 31
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
HEADERS
=======
Cache-Control: no-cache
Connection: Keep-Alive
Accept-Charset: utf-8
Accept-Encoding: gzip, deflate
Accept-Language: en, zh
Cookie: .AspNet.Consent=yes
Host: localhost:5000
Best Regards,
Ysmary
This issue is solved!
I hit the same with SnapDevelop2021, and tried to solve the issue by installing "DWNet.Data.AspNetCore" Nuget Package by referencing to below Logan's post.
https://community.appeon.com/index.php/qna/q-a/beginner-snapdevelop-demo-issues#reply-25306
Thanks Logan for your advice.
Regards,
JX