Exemple #1
0
        public IEnumerable <TaskCategoryModel> GetCategories()
        {
            var categories = _mapper.Map <IEnumerable <TaskCategoryModel> >(_taskCategoryRepository.GetCategories());

            if (categories is null)
            {
                throw new Exception("Database not connected.");
            }

            return(categories);
        }