File tree Expand file tree Collapse file tree 4 files changed +15
-15
lines changed
NetCoreStack.Api.Hosting/Controllers
NetCoreStack.Domain.Contracts/ApiContracts
NetCoreStack.WebClient.Hosting/Controllers Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -159,13 +159,13 @@ Proxy sends all POST methods as JSON but if the method parameter model contains
159159``` csharp
160160// Interface
161161 [HttpPostMarker ]
162- Task < AlbumViewModel > SaveAlbumSubmit (AlbumViewModelSubmit model )
162+ Task < AlbumViewModel > SaveAlbumSubmitAsync (AlbumViewModelSubmit model )
163163```
164164
165165``` csharp
166166// API Controller
167- [HttpPost (nameof (SaveAlbumSubmit ))]
168- public async Task < AlbumViewModel > SaveAlbumSubmit (AlbumViewModelSubmit model )
167+ [HttpPost (nameof (SaveAlbumSubmitAsync ))]
168+ public async Task < AlbumViewModel > SaveAlbumSubmitAsync (AlbumViewModelSubmit model )
169169```
170170
171171
Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ public async Task<CollectionResult<AlbumViewModel>> GetAlbums([FromQuery]Collect
7474 return query . ToCollectionResult ( request ) ;
7575 }
7676
77- [ HttpPost ( nameof ( SaveAlbum ) ) ]
78- public async Task < AlbumViewModel > SaveAlbum ( [ FromBody ] AlbumViewModel model )
77+ [ HttpPost ( nameof ( SaveAlbumAsync ) ) ]
78+ public async Task < AlbumViewModel > SaveAlbumAsync ( [ FromBody ] AlbumViewModel model )
7979 {
8080 await Task . CompletedTask ;
8181
@@ -102,8 +102,8 @@ public async Task<AlbumViewModel> SaveAlbum([FromBody]AlbumViewModel model)
102102 return model ;
103103 }
104104
105- [ HttpPost ( nameof ( SaveAlbumSubmit ) ) ]
106- public async Task < AlbumViewModel > SaveAlbumSubmit ( AlbumViewModelSubmit model )
105+ [ HttpPost ( nameof ( SaveAlbumSubmitAsync ) ) ]
106+ public async Task < AlbumViewModel > SaveAlbumSubmitAsync ( AlbumViewModelSubmit model )
107107 {
108108 await Task . CompletedTask ;
109109
@@ -142,8 +142,8 @@ public async Task<AlbumViewModel> SaveAlbumSubmit(AlbumViewModelSubmit model)
142142 return model ;
143143 }
144144
145- [ HttpPut ( nameof ( UpdateAlbum ) ) ]
146- public async Task < AlbumViewModel > UpdateAlbum ( long id , [ FromBody ] AlbumViewModel model )
145+ [ HttpPut ( nameof ( UpdateAlbumAsync ) ) ]
146+ public async Task < AlbumViewModel > UpdateAlbumAsync ( long id , [ FromBody ] AlbumViewModel model )
147147 {
148148 await Task . CompletedTask ;
149149 return model ;
Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ public interface IAlbumApi : IApiContract
1212 Task < InitRequestContext > GetInitialContext ( ) ;
1313
1414 [ HttpPostMarker ]
15- Task < AlbumViewModel > SaveAlbum ( AlbumViewModel model ) ;
15+ Task < AlbumViewModel > SaveAlbumAsync ( AlbumViewModel model ) ;
1616
1717 [ HttpPostMarker ]
18- Task < AlbumViewModel > SaveAlbumSubmit ( AlbumViewModelSubmit model ) ;
18+ Task < AlbumViewModel > SaveAlbumSubmitAsync ( AlbumViewModelSubmit model ) ;
1919
2020 [ HttpPutMarker ]
21- Task < AlbumViewModel > UpdateAlbum ( long id , AlbumViewModel model ) ;
21+ Task < AlbumViewModel > UpdateAlbumAsync ( long id , AlbumViewModel model ) ;
2222
2323 [ HttpDeleteMarker ]
2424 Task DeleteAlbum ( long id ) ;
Original file line number Diff line number Diff line change @@ -82,21 +82,21 @@ public async Task<IActionResult> GetBsonAlbums(CollectionRequest request)
8282 [ HttpPost ]
8383 public async Task < IActionResult > SaveAlbum ( [ FromBody ] AlbumViewModel model )
8484 {
85- var albumCollection = await _albumApi . SaveAlbum ( model ) ;
85+ var albumCollection = await _albumApi . SaveAlbumAsync ( model ) ;
8686 return Ok ( ) ;
8787 }
8888
8989 [ HttpPost ]
9090 public async Task < IActionResult > SaveAlbumSubmit ( AlbumViewModelSubmit model )
9191 {
92- var albumCollection = await _albumApi . SaveAlbumSubmit ( model ) ;
92+ var albumCollection = await _albumApi . SaveAlbumSubmitAsync ( model ) ;
9393 return Ok ( ) ;
9494 }
9595
9696 [ HttpPost ]
9797 public async Task < IActionResult > UpdateAlbum ( )
9898 {
99- var albumCollection = await _albumApi . UpdateAlbum ( 1 , new AlbumViewModel { Id = 1 , Title = "Test" } ) ;
99+ var albumCollection = await _albumApi . UpdateAlbumAsync ( 1 , new AlbumViewModel { Id = 1 , Title = "Test" } ) ;
100100 return Ok ( ) ;
101101 }
102102
You can’t perform that action at this time.
0 commit comments