File tree Expand file tree Collapse file tree
src/Services/Ordering/Ordering.API Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,26 +58,29 @@ public async Task<IActionResult> GetOrderById(Guid orderId)
5858
5959 // POST api/ordering/orders/create
6060 [ HttpPut ( "orders/create" ) ]
61- public async Task < int > Post ( [ FromBody ] Order order )
61+ public async Task < IActionResult > Post ( [ FromBody ] Order order )
6262 {
6363 _orderRepository . Add ( order ) ;
64- return await _orderRepository . UnitOfWork . CommitAsync ( ) ;
64+ int numChanges = await _orderRepository . UnitOfWork . CommitAsync ( ) ;
65+ return Ok ( numChanges ) ;
6566 }
6667
6768 // PUT api/ordering/orders/xxxOrderGUIDxxxx/update
6869 [ HttpPut ( "orders/{orderId:Guid}/update" ) ]
69- public async Task < int > UpdateOrder ( Guid orderID , [ FromBody ] Order orderToUpdate )
70+ public async Task < IActionResult > UpdateOrder ( Guid orderID , [ FromBody ] Order orderToUpdate )
7071 {
7172 _orderRepository . Update ( orderToUpdate ) ;
72- return await _orderRepository . UnitOfWork . CommitAsync ( ) ;
73+ int numChanges = await _orderRepository . UnitOfWork . CommitAsync ( ) ;
74+ return Ok ( numChanges ) ;
7375 }
7476
7577 // DELETE api/ordering/orders/xxxOrderGUIDxxxx
7678 [ HttpDelete ( "orders/{orderId:Guid}/remove" ) ]
77- public async Task < int > Remove ( Guid id )
79+ public async Task < IActionResult > Remove ( Guid id )
7880 {
7981 await _orderRepository . Remove ( id ) ;
80- return await _orderRepository . UnitOfWork . CommitAsync ( ) ;
82+ int numChanges = await _orderRepository . UnitOfWork . CommitAsync ( ) ;
83+ return Ok ( numChanges ) ;
8184 }
8285
8386
Original file line number Diff line number Diff line change @@ -12,3 +12,5 @@ services:
1212 - " 80:80"
1313 volumes :
1414 - .:/app
15+ extra_hosts :
16+ - " CESARDLBOOKVHD:10.0.75.1"
Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ services:
88 dockerfile : Dockerfile
99 ports :
1010 - " 80:80"
11+ extra_hosts :
12+ - " CESARDLBOOKVHD:10.0.75.1"
You can’t perform that action at this time.
0 commit comments