-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from dadjh85/master
* added logic of apicontroller where the [frombody]
- Loading branch information
Showing
5 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
tests/UnitTests/Acheve.TestHost/Routing/Builders/ValuesV5Controller.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace UnitTests.Acheve.TestHost.Builders | ||
{ | ||
[Route("api/values")] | ||
[ApiController] | ||
public class ValuesV5Controller : ControllerBase | ||
{ | ||
[HttpPost] | ||
public IActionResult Post1(Pagination pagination) | ||
{ | ||
return Ok(); | ||
} | ||
|
||
[HttpPost("{id:int}")] | ||
public IActionResult Post2(int id, Pagination pagination1) | ||
{ | ||
if (pagination1 == null) | ||
{ | ||
return BadRequest(); | ||
} | ||
|
||
return Ok(); | ||
} | ||
|
||
[HttpPatch("{id:int}")] | ||
public IActionResult Patch1(int id, Pagination pagination1) | ||
{ | ||
if (pagination1 == null) | ||
{ | ||
return BadRequest(); | ||
} | ||
|
||
return Ok(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters