Esempio n. 1
0
        public List <Bug> GetAllBugs()
        {
            BugRepository repo    = new BugRepository();
            List <Bug>    bugList = repo.GetAll().ToList();

            return(bugList);
        }
Esempio n. 2
0
        public IActionResult Get()
        {
            var bugs     = _bugRepository.GetAll();
            var bugsDtos = _mapper.Map <List <BugResponseDto> >(bugs);

            return(Ok(bugsDtos));
        }
Esempio n. 3
0
        public List <Bug> GetBugsByProject(Project project)
        {
            BugRepository bugRepo = new BugRepository();

            List <Bug> bugList = bugRepo.GetAll().Where(x => x.Project.Id == project.Id).ToList();

            return(bugList);
        }
Esempio n. 4
0
 public IHttpActionResult Get()
 {
     using (var context = new DataContext()) {
         BugRepository bugRepository = new BugRepository(context);
         var           bugs          = bugRepository.GetAll();
         var           models        = MapperHelper.Map <ICollection <BugApi> >(bugs);
         return(Ok(models));
     }
 }
Esempio n. 5
0
        public Controller()
        {
            if (_isLoaded)
            {
                return;
            }

            UserRepository.Load(Persistence.Controller.GetUsers());
            BugRepository.Load(Persistence.Controller.GetBugs());
            TaskRepository.Load(Persistence.Controller.GetTasks());


            foreach (var bug in BugRepository.GetAll())
            {
                bug.Load(TaskRepository.GetAll().Where(x => x.Bug.Id == bug.Id).ToList());
            }
            foreach (var employee in UserRepository.GetAll().OfType <Employee>())
            {
                employee.Load(TaskRepository.GetAll().Where(x => x.Employee != null && x.Employee.Id == employee.Id).ToList());
            }

            _isLoaded = true;
        }
Esempio n. 6
0
 public List <Bug> GetAll()
 {
     return(_bugRepository.GetAll());
 }