public AccountsOutputDto MapThirdPartyMappedAccounts(IDataReader reader)
        {
            var accountsOutputDto = new AccountsOutputDto
            {
                AccountId   = Convert.ToInt32(reader["account_id"]),
                AccountName = reader["name"].ToString(),
                Description = reader["description"].ToString(),
                TypeId      = Convert.ToInt32(reader["type_id"]),
                Type        = reader["type"].ToString(),
                CategoryId  = Convert.ToInt32(reader["category_id"]),
                Category    = reader["category"].ToString(),
                HasMapping  = reader["map_id"] != DBNull.Value,
                ThirdPartyMappedAccounts = reader["map_id"] == DBNull.Value
                    ? new List <MappedAccountsOutputDto>()
                    : new List <MappedAccountsOutputDto>
                {
                    new MappedAccountsOutputDto
                    {
                        MapId = Convert.ToInt32(reader["map_id"]),
                        ThirdPartyAccountId   = Convert.ToInt32(reader["third_party_account_id"]),
                        OrganizationName      = reader["organization_name"].ToString(),
                        ThirdPartyAccountName = reader["third_party_account_name"].ToString()
                    }
                }
            };

            return(accountsOutputDto);
        }
        public AccountsOutputDto MapAccounts(IDataReader reader)
        {
            var accountsOutputDto = new AccountsOutputDto
            {
                AccountId   = Convert.ToInt32(reader["account_id"]),
                AccountName = reader["name"].ToString(),
                Description = reader["description"].ToString(),
                TypeId      = Convert.ToInt32(reader["type_id"]),
                Type        = reader["type"].ToString(),
                CategoryId  = Convert.ToInt32(reader["category_id"]),
                Category    = reader["category"].ToString(),
                HasJournal  = reader["has_journal"].ToString(),
                CanDeleted  = reader["has_journal"].ToString() == "No",
                CanEdited   = reader["has_journal"].ToString() == "No"
            };

            return(accountsOutputDto);
        }