- Hands-On Full:Stack Web Development with ASP.NET Core
- Tamir Dresher Amir Zuker Shay Friedman
- 130字
- 2021-06-10 19:37:31
Explicit return type
The simplest form of an action method is the one where the return type is a predefined .NET type, such as primitives or classes you have created. When the method returns a value, the ASP.NET Core pipeline create a success response (with the status code 200 OK) and serializes the value with a formatter that is suitable to the content type that the client requested (via the Accept header in the HTTP request) or with the configured default formatter (the JSON formatter, unless configured otherwise).
Although returning an explicit predefined type is the simplest way to create actions, it's also the most restricted way. My recommendation is not to use this method, and instead, configure all of your actions to return ActionResult<T> or IActionResult.
- 解析QUIC/HTTP3:未來互聯網的基石
- OpenLayers Cookbook
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- 中小型局域網組建、管理與維護實戰
- Mastering JavaFX 10
- 網絡安全應急響應技術實戰指南
- 基于IPv6的家居物聯網開發與應用技術
- Web用戶查詢日志挖掘與應用
- 物聯網與智慧農業
- INSTANT Social Media Marketing with HootSuite
- 物聯網技術與實踐
- 通信系統實戰筆記:無處不在的信號處理
- Hands-On Cloud:Native Microservices with Jakarta EE
- 視聽變革:廣電的新媒體戰略
- Hands-On Full Stack Web Development with Aurelia