You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a new service with a method that takes an int input parameter and the call kept failing with the exception below.
Error obtaining client-helper 'UnaryTaskAsync' (from: 'System.Int32', to: 'System.Collections.Generic.IEnumerable´1[[Project.DataLayer.Application.Models.WebARMenu, Project.DataLayer.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'): GenericArguments[0], 'System.Int32', on 'System.Threading.Tasks.Task´1[TResponse] UnaryTaskAsync[TRequest,TResponse](ProtoBuf.Grpc.CallContext ByRef, Grpc.Core.CallInvoker, Grpc.Core.Method´2[TRequest,TResponse], TRequest, System.String)' violates the constraint of type 'TRequest'.
I was able to get around it by creating a data contract with the int parameter as a property and update my service method to take the data contract object as the input.
I have seen some stackoverflow posts on this now that go back to 2020 and mention adding support for int input param types. It's now 2023 and am wondering if this is going to happen any time soon? Thanks.
The text was updated successfully, but these errors were encountered:
I added a new service with a method that takes an int input parameter and the call kept failing with the exception below.
Error obtaining client-helper 'UnaryTaskAsync' (from: 'System.Int32', to: 'System.Collections.Generic.IEnumerable´1[[Project.DataLayer.Application.Models.WebARMenu, Project.DataLayer.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'): GenericArguments[0], 'System.Int32', on 'System.Threading.Tasks.Task´1[TResponse] UnaryTaskAsync[TRequest,TResponse](ProtoBuf.Grpc.CallContext ByRef, Grpc.Core.CallInvoker, Grpc.Core.Method´2[TRequest,TResponse], TRequest, System.String)' violates the constraint of type 'TRequest'.
I was able to get around it by creating a data contract with the int parameter as a property and update my service method to take the data contract object as the input.
I have seen some stackoverflow posts on this now that go back to 2020 and mention adding support for int input param types. It's now 2023 and am wondering if this is going to happen any time soon? Thanks.
The text was updated successfully, but these errors were encountered: