Beispiel #1
0
        //Get api/wallettransaction
        public IHttpActionResult GetWalletTransactions()
        {
            WalletTransactionService walletTransactionService = CreateWalletTransactionService();
            var transactions = walletTransactionService.GetWalletTransactions();

            return(Ok(transactions));
        }
Beispiel #2
0
        //Get api/wallettransaction/id
        public IHttpActionResult GetWalletTransactions(int id)
        {
            WalletTransactionService walletTransactionService = CreateWalletTransactionService();
            var transaction = walletTransactionService.GetWalletTransactionById(id);

            return(Ok(transaction));
        }
Beispiel #3
0
        private WalletTransactionService CreateWalletTransactionService()
        {
            var userId        = Guid.Parse(User.Identity.GetUserId());
            var walletService = new WalletService(userId);
            var service       = new WalletTransactionService(userId, walletService.GetWalletId());

            return(service);
        }
Beispiel #4
0
 public WalletController(WalletTransactionService walletTransactionService, IWalletTransactionQuery walletTransactionQuery)
 {
     this.walletTransactionService = walletTransactionService;
     this.walletTransactionQuery   = walletTransactionQuery;
 }