0

I have below lines of code and as we know WebInvoke enables Rest Service capablity. I am converting my code to CoreWCF but WebInvoke is not supported.

[OperationContract]
[WebInvoke(Method = "POST", 
RequestFormat = WebMessageFormat.Json, 
ResponseFormat = WebMessageFormat.Json, 
UriTemplate = "GetUserData", 
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string GetUserDetails();

I tried adding below namespace but still it is not supported.

using Microsoft.AspNetCore.Mvc;

Can someone help me to convert the above lines of code to CoreWCF.

1 Answer 1

1

I think you can use . NET Upgrade Assistant.

.NET Upgrade Assistant is a command-line tool that can run on different types of .NET Framework applications. It is designed to help upgrade .NET Framework apps to .NET 6. After you run this tool, in most cases, the app will require additional action to complete the migration. This tool installs analyzers that can help complete the migration.

Here are some documents that you might find helpful:

Document1

Document2

Best Regards

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.