private List <PerformerLocalDto> RetrievePerformersFromDatabase()
        {
            List <PerformerLocalDto> allPerformers = new List <PerformerLocalDto>();

            try {
                AccessRetriever retriever       = new AccessRetriever(DatabasePath);
                DataSet         resultsetFromDb = retriever.GetPerformers();
                DataTable       performersTable = resultsetFromDb.Tables[0];
                foreach (DataRow row in performersTable.Rows)
                {
                    int?id = GetStringValueAsInt(row, "ID");
                    PerformerLocalDto performer = new PerformerLocalDto()
                    {
                        Id   = (int)id,
                        Name = row["Performer"].ToString()
                    };
                    allPerformers.Add(performer);
                }
                Log.Information("Read {0} performers from database.", allPerformers.Count);
            }
            catch (Exception e) {
                Log.Error(e, "Could not retrieve performers from database");
            }
            return(allPerformers);
        }
        private List <PerformerLocalDto> RetrievePerformers()
        {
            List <PerformerLocalDto> allPerformers = new List <PerformerLocalDto>();

            try {
                AccessRetriever retriever       = new AccessRetriever(DatabasePath);
                DataSet         resultsetFromDb = retriever.GetPerformers();
                DataTable       performersTable = resultsetFromDb.Tables[0];
                foreach (DataRow row in performersTable.Rows)
                {
                    string            idStr     = row["ID"].ToString();
                    bool              result    = int.TryParse(idStr, out int id);
                    PerformerLocalDto performer = new PerformerLocalDto()
                    {
                        Id   = id,
                        Name = row["Performer"].ToString()
                    };
                    allPerformers.Add(performer);
                }
            }
            catch (Exception e) {
                Log.Error(e, "Could not retrieve performers from database");
                throw new ArgumentException("Could not retrieve performers from database", e);
            }
            return(allPerformers);
        }
        public void Add(PerformerLocalDto performer)
        {
            AccessRetriever retriever       = new AccessRetriever(DatabasePath);
            DataSet         dataSet         = retriever.GetPerformers();
            DataTable       performersTable = dataSet.Tables[0];
            DataRow         newRow          = dataSet.Tables[0].NewRow();

            newRow["Performer"] = performer.Name;
            // newRow[2] = 1; // this is supposed to be Performer Type. Can use the column number instead
            performersTable.Rows.Add(newRow);
            var changes = dataSet.GetChanges();

            retriever.UpdateAccessTableFromDataSet(dataSet, "tblPerformers", "ID, Performer");
        }