Esempio n. 1
0
        public IActionResult Get()
        {
            var result = _tasksService.GetAllTaskDtos(x => true);

            throw new Exception();
            return(Ok(result));
        }
Esempio n. 2
0
        public string Validate(int userId)
        {
            if (this.GetById(userId) == null)
            {
                return("User does not exists");
            }

            if (_ticketsService.GetAllTaskDtos(x => x.CreatorID == userId || x.AssigneeID == userId)
                .Any())
            {
                return("User cannot be deleted. User is has active tickets to resolve.");
            }

            return(string.Empty);
        }