public IActionResult GetAccountListing() { var accounts = _accountManager.GetHierarchy(); var response = new List <AccountListing>(); foreach (var account in accounts) { response.Add(AccountListing.MapFromObject(account)); } return(Ok(response)); }
public static AccountListingDTO ToDTO(this AccountListing accountListing) => new(accountListing.AccountId, accountListing.Nickname);