1. Ron Calder
  2. SnapObjects
  3. Tuesday, 24 March 2020

Getting these errors when trying to do the example.  I know I'm missing something but I have gone blind staring at it.

Any thoughts?  Has issues with IDataStore and PowerBuilder.Data.

 

1>\Services\IDepartmentService.cs (6,7) : error CS0246 : The type or namespace name 'PowerBuilder' could not be found (are you missing a using directive or an assembly reference?)
1>\Services\Impl\DepartmentService.cs (6,7) : error CS0246 : The type or namespace name 'PowerBuilder' could not be found (are you missing a using directive or an assembly reference?)
1>\Services\Impl\DepartmentService.cs (26,27) : error CS0246 : The type or namespace name 'IDataStore' could not be found (are you missing a using directive or an assembly reference?)
1>\Services\Impl\DepartmentService.cs (32,16) : error CS0246 : The type or namespace name 'IDataStore' could not be found (are you missing a using directive or an assembly reference?)
1>\Services\Impl\DepartmentService.cs (38,27) : error CS0246 : The type or namespace name 'IDataStore' could not be found (are you missing a using directive or an assembly reference?)
1>\Services\Impl\DepartmentService.cs (11,38) : error CS0738 : 'DepartmentService' does not implement interface member 'IDepartmentService.Retrieve()'. 'DepartmentService.Retrieve()' cannot implement 'IDepartmentService.Retrieve()' because it does not have the matching return type of 'IDataStore'.
1>\Services\Impl\DepartmentService.cs (11,38) : error CS0535 : 'DepartmentService' does not implement interface member 'IDepartmentService.Create(D_Department)'
1>\Services\Impl\DepartmentService.cs (11,38) : error CS0535 : 'DepartmentService' does not implement interface member 'IDepartmentService.Update(IDataStore)'
1>\Services\Impl\DepartmentService.cs (11,38) : error CS0535 : 'DepartmentService' does not implement interface member 'IDepartmentService.Delete(IDataStore)'

 

Thank you in advance,

Ron

Armeen Mazda @Appeon Accepted Answer Pending Moderation
0
Votes
Undo

Did you add DWNet.Data library?

Also, you will need the SnapObjects.Data library and the database-specific library (e.g. SnapObjects.Data.SqlServer).

Comment
Please post separate issue as separate questions.

Yes, we renamed the library.
  1. Armeen Mazda @Appeon
  2. Tuesday, 24 March 2020
Any thoughts on the Error in the browser? Everything compiles correctly.



System.InvalidOperationException: Unable to resolve service for type 'WebAPI1.Services.IDepartmentService' while attempting to activate 'WebAPI1.Controllers.SampleController'.

at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired) at lambda_method(Closure , IServiceProvider , Object[] )

at Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider.<>c__DisplayClass4_0.<CreateActivator>b__0(ControllerContext controllerContext)

at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>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.InvokeInnerFilterAsync()

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()

at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)

at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)

at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)



Thank you,

Ron
  1. Ron Calder
  2. Tuesday, 24 March 2020
Please post separate issue as separate questions.
  1. Armeen Mazda @Appeon
  2. Tuesday, 24 March 2020
There are no comments made yet.
  1. Tuesday, 24 March 2020
  2. SnapObjects
  3. # 1
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.