mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-19 13:41:24 +08:00
27 lines
630 B
C#
27 lines
630 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Util.AspNetCore.Tests.Samples;
|
|
|
|
namespace Util.AspNetCore.Tests.Controllers;
|
|
|
|
/// <summary>
|
|
/// 测试Api控制器2
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route( "api/[controller]" )]
|
|
public class Test2Controller : ControllerBase {
|
|
/// <summary>
|
|
/// Post操作
|
|
/// </summary>
|
|
[HttpPost("create")]
|
|
public string Create( CustomerDto dto ) {
|
|
return $"ok:{dto.Code}";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Post操作
|
|
/// </summary>
|
|
[HttpPost]
|
|
public IActionResult Create2( CustomerDto dto ) {
|
|
return new JsonResult( dto );
|
|
}
|
|
} |