public List <Bug> GetAllBugs() { BugRepository repo = new BugRepository(); List <Bug> bugList = repo.GetAll().ToList(); return(bugList); }
public IActionResult Get() { var bugs = _bugRepository.GetAll(); var bugsDtos = _mapper.Map <List <BugResponseDto> >(bugs); return(Ok(bugsDtos)); }
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); }
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)); } }
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; }
public List <Bug> GetAll() { return(_bugRepository.GetAll()); }