- 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.
- Twilio Cookbook
- OpenLayers Cookbook
- Force.com Development Blueprints
- Hands-On Full Stack Development with Spring Boot 2 and React(Second Edition)
- 物聯(lián)網(wǎng)信息安全
- 智慧城市中的移動互聯(lián)網(wǎng)技術(shù)
- 信息通信網(wǎng)絡(luò)建設(shè)安全管理概要2
- 面向云平臺的物聯(lián)網(wǎng)多源異構(gòu)信息融合方法
- 世界互聯(lián)網(wǎng)發(fā)展報告·2019
- 物聯(lián)網(wǎng)通信技術(shù)
- 網(wǎng)絡(luò)AI+:2030后的未來網(wǎng)絡(luò)
- 6G無線網(wǎng)絡(luò)空口關(guān)鍵技術(shù)
- 紅藍(lán)攻防:構(gòu)建實(shí)戰(zhàn)化網(wǎng)絡(luò)安全防御體系
- Getting Started with nopCommerce
- 互聯(lián)網(wǎng)安全的40個智慧洞見(2016)