public static Client GetLastClient(SqlConnectionStringBuilder stringBuilder, Bank bank)
        {
            var    sqlQuery   = @"SELECT TOP 1 *
                             FROM Clients
                             ORDER BY ID DESC";
            Client lastClient = null;

            using (var connector = new SqlConnector(stringBuilder))
            {
                var reader = connector.GetData(sqlQuery);
                while (reader.Read())
                {
                    lastClient = ConvertSqlData.ToClient(reader, bank);
                }
            }

            return(lastClient);
        }
        public static Client GetClientById(SqlConnectionStringBuilder stringBuilder, int id, Bank bank)
        {
            var sqlQuery = $@"SELECT * FROM Clients
                             WHERE Id = {id}";

            Client currentClient = null;

            using (var connector = new SqlConnector(stringBuilder))
            {
                var reader = connector.GetData(sqlQuery);
                while (reader.Read())
                {
                    currentClient = ConvertSqlData.ToClient(reader, bank);
                }
            }

            return(currentClient);
        }
        private void DbFillClients(SqlConnectionStringBuilder connectionStringBuilder)
        {
            Clients = new List <AClient>();
            var sqlGetClients = @"SELECT * FROM Clients";

            using (var connector = new SqlConnector(connectionStringBuilder))
            {
                using (var reader = connector.GetData(sqlGetClients))
                {
                    while (reader.Read())
                    {
                        var currentClient = ConvertSqlData.ToClient(reader, this);

                        GetCredits((int)reader[0], connectionStringBuilder, currentClient);
                        GetDeposits((int)reader[0], connectionStringBuilder, currentClient);

                        Clients.Add(currentClient);
                    }
                }
            }
        }