我正在将一个.NET Framework 应用程序移植到.NET Core。我通过NuGet添加了 System.ServiceModel.Web 但似乎没有起作用。我需要寻找 "WebGet" 的替代方案:
[ServiceContract]
public interface IChannelsApi
{
[WebGet(UriTemplate = "", ResponseFormat = WebMessageFormat.Json), OperationContract]
List<Channel> GetChannels();
[WebGet(UriTemplate = "{name}", ResponseFormat = WebMessageFormat.Json), OperationContract]
Channel GetChannel(string name);
}
What I have to do?