/// <summary>
        /// Gets all visibile datasets for the user
        /// </summary>
        /// <param name="userId">nullable userid</param>
        /// <returns>list of datasets</returns>
        public List <DatasetDto> GetAllVisible(int?userId)
        {
            List <DatasetDto> dtoList = new List <DatasetDto>();

            foreach (Dataset ds in _datasetRepository.GetAllVisible(userId).OrderBy(x => x.Name).ToList())
            {
                try
                {
                    dtoList.Add(DatasetMapper.ToDto(ds));
                }
                catch { }// ignore error so other datasets can be loaded correctly
            }
            return(dtoList);
        }