public ActionResult <List <AccountDto> > GetAccounts()
        {
            var accounts = _context.Accounts.ToList();

            if (accounts.Count == 0)
            {
                return(new List <AccountDto>());
            }

            var accountDtos = accounts.Select(a => AccountsLogic.MapAccountEntityToAccountDto(a));

            return(Ok(accountDtos));
        }
 public AccountsController()
 {
     this.AccountsDAO   = new AccountsDAO(this.Context);
     this.AccountsLogic = new AccountsLogic(this.Context);
 }