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
├── src | |
│ ├── Api # API layer | |
| | ├── UseCases # API business rules in use cases | |
| | | ├── GetTodos # Use Case to get all the todo tasks | |
| | | | ├── TodoController.cs # Todo Controller for the Get All | |
| | | | ├── GetTodosPresenter.cs # Presenter | |
│ ├── Application # Application layer | |
| | ├── Boundaries # Input and output ports helping us to cross boundaries | |
| | ├── Services # Application services to handle application business logic | |
| | ├── UseCases # Use cases interactors |
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 CheckoutService : IDomainService | |
{ | |
IRepository<Purchase> purchaseRepository; | |
public CheckoutService(IRepository<Purchase> purchaseRepository) | |
{ | |
this.purchaseRepository = purchaseRepository; | |
} | |
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 CartService : ICartService | |
{ | |
//... | |
CheckoutService checkoutDomainService; | |
public CartService(... CheckoutService checkoutDomainService ...) | |
{ | |
//... | |
this.checkoutDomainService = checkoutDomainService; |
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] |
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] |