Last active
February 23, 2020 08:55
-
-
Save pereiren/3be392a2ada2115d199431fec73477d8 to your computer and use it in GitHub Desktop.
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
public class CartController : ApiController | |
{ | |
private readonly ICartService _cartService; | |
public CartController(ICartService cartService) | |
{ | |
_cartService = cartService; | |
} | |
[HttpPost] | |
public Response<CheckOutResultDto> Checkout(Guid customerId) | |
{ | |
Response<CheckOutResultDto> response = new Response<CheckOutResultDto>(); | |
try | |
{ | |
response.Object = _cartService.CheckOut(customerId); | |
} | |
catch (Exception ex) | |
{ | |
//... | |
} | |
return response; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment