DTO如何不污染你在ServiceStack中的web服务?
How DTO does not pollute your web services in ServiceStack?
我是 servicestack 的新手。我正在阅读 Servicestack Wiki 并发现此语句 "your DTO's define everything Service Stack does not pollute your web services with any additional custom artefacts or markup." 请让我知道 DTO 在 serviceStack 中是如何工作的,这样它就不会污染网络服务?
在 ServiceStack 中,您可以使用干净的、未注释的 POCO 来定义您的服务合同(即请求和响应 DTO)。您也不需要任何自定义构建步骤或生成的代理来调用您的服务,因为您可以使用任何 ServiceStack Generic .NET Service Clients 在客户端上重复使用您定义服务的相同 DTO提供端到端类型化 API,无需代码生成或自定义构建步骤。
以Customer REST Example on the Home page and it's stand-alone Integration Test为例。
我是 servicestack 的新手。我正在阅读 Servicestack Wiki 并发现此语句 "your DTO's define everything Service Stack does not pollute your web services with any additional custom artefacts or markup." 请让我知道 DTO 在 serviceStack 中是如何工作的,这样它就不会污染网络服务?
在 ServiceStack 中,您可以使用干净的、未注释的 POCO 来定义您的服务合同(即请求和响应 DTO)。您也不需要任何自定义构建步骤或生成的代理来调用您的服务,因为您可以使用任何 ServiceStack Generic .NET Service Clients 在客户端上重复使用您定义服务的相同 DTO提供端到端类型化 API,无需代码生成或自定义构建步骤。
以Customer REST Example on the Home page and it's stand-alone Integration Test为例。